BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TADOConnection and Oracle

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO)
View previous topic :: View next topic  
Author Message
Mick Board
Guest





PostPosted: Wed Oct 25, 2006 4:24 pm    Post subject: TADOConnection and Oracle Reply with quote



Hi,
I'm finding an interesting problem when using a TADOConnection connected to
an Oracle database with both the Microsoft Oracle Driver or Oracle's Oracle
driver. (I'm using MDAC 2.Cool. I'm writing some software that's dependent
on handling if the database goes down. On shutting down the database for
testing purposes I'm finding that I can trap an error occuring when I try
and run a TADOQuery that's using the TADOConnection to connect, however
the TADOConnection object, always tells me it's connected - even if I close
it's connection and open it again!! The problem with this is a) the
database is down, b) if I bring the database up again, try connecting again
(yes - successful again), try closing and running the TADOQuery based off
this connection - the query fails. For some reason the TADOConnection
object isn't giving an error when it's being closed then opened again on the
shutdown database.

Now: I can do the above against SQL Server database and it works correctly.
i.e. If I disconnect and reconnect the TADOConnection object when the SQL
Server database is down it tells me accordingly. When it comes up again, I
can run code to connect the TADOConnection properly and the TADOQuery that
uses this then works again (after its opened again).

Any thoughts on how I can get this to work for Oracle. This is driving me
crazy!
Back to top
Mick Board
Guest





PostPosted: Thu Oct 26, 2006 6:34 am    Post subject: Re: TADOConnection and Oracle Reply with quote



Resolved. I need to have a 2nd .udl file that exists, but doesn't connect
to anything. Set the connection object to point to it, wait for the
timeout, connect to the original .udl file and it behaves correctly.



"Mick Board" <mick_board (AT) yahoo (DOT) com> wrote in message
news:453f4976 (AT) newsgroups (DOT) borland.com...
Quote:
Hi,
I'm finding an interesting problem when using a TADOConnection connected
to an Oracle database with both the Microsoft Oracle Driver or Oracle's
Oracle driver. (I'm using MDAC 2.Cool. I'm writing some software that's
dependent on handling if the database goes down. On shutting down the
database for testing purposes I'm finding that I can trap an error
occuring when I try and run a TADOQuery that's using the TADOConnection
to connect, however the TADOConnection object, always tells me it's
connected - even if I close it's connection and open it again!! The
problem with this is a) the database is down, b) if I bring the database
up again, try connecting again (yes - successful again), try closing and
running the TADOQuery based off this connection - the query fails. For
some reason the TADOConnection object isn't giving an error when it's
being closed then opened again on the shutdown database.

Now: I can do the above against SQL Server database and it works
correctly. i.e. If I disconnect and reconnect the TADOConnection object
when the SQL Server database is down it tells me accordingly. When it
comes up again, I can run code to connect the TADOConnection properly and
the TADOQuery that uses this then works again (after its opened again).

Any thoughts on how I can get this to work for Oracle. This is driving me
crazy!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.