Page 1 of 1
TOraSession timeout
Posted: Tue 15 May 2007 12:36
by benkedon
As I understand it, you only have "timeout" available in Net / Direct mode. Well, I had to move away from Net/Direct mode (in certain cases), because I wasn't getting the level of error-detection/handling I needed, to deal with connecting to Oracle versions 7 thru 10g databases. Trouble is, sometimes I try to connect to certain databases and it will "hang" indefinitely long, i.e. without returning an error. Is there any way I can deal with this ?
Posted: Tue 15 May 2007 14:34
by Plash
OCI does not support setting the connection timeout. Therefore ODAC supports this feature only in Direct mode.
Posted: Tue 15 May 2007 15:20
by benkedon
Thanks for the info about OCI vs Direct mode, but is there a way for me to programmatically "break out" of the "OraSession1->Connected = true;"-statement, after a certain amount of time, so I can continue on, e.g. connecting to other databases, etc. ? I'm running ODAC 5 under BCB 5, right now, but I'll be upgrading to ODAC 6, shortly. Thanks.
Posted: Tue 15 May 2007 15:36
by Plash
There is no such way.
Re: TOraSession timeout
Posted: Sat 26 May 2007 13:39
by liyf
benkedon wrote:As I understand it, you only have "timeout" available in Net / Direct mode. Well, I had to move away from Net/Direct mode (in certain cases), because I wasn't getting the level of error-detection/handling I needed, to deal with connecting to Oracle versions 7 thru 10g databases. Trouble is, sometimes I try to connect to certain databases and it will "hang" indefinitely long, i.e. without returning an error. Is there any way I can deal with this ?
you can create a new thread for connecting and terminate the thread when timeout.