Hello,
If a TOraSession has been timed out, but the TOraSession doesn't know it yet because it hasn't run a query in a while, then when the TOraSession is freed, there is a delay because it tries to disconnect first.
Is there a way that I can just free the TOraSession without any attempted interaction with the database?
I don't want to do this all the time - just in rare situations when I want to shut down my application as fast as possible.
Thanks
-John
Question about disconnect after lost connection
Re: Question about disconnect after lost connection
Could you expand a bit more on the issue? What is the purpose of freeing the TOraSession object in your code? If Oracle server returns an error, you can handle it in the TRY...EXCEPT block. The fastest way to close an application is by using the Halt procedure.
Re: Question about disconnect after lost connection
Hello,
I am freeing the TOraSession because I am done with it. If there is an error, I don't care since, and I know that I can try..except around it. But I don't want to wait for it either. Sometimes there is a delay if the connection has been lost. I would like to know if there is a way that I can free the TOraSession with no further communication to the database.
I know about HALT, but I'd rather avoid it if possible.
Thank you.
I am freeing the TOraSession because I am done with it. If there is an error, I don't care since, and I know that I can try..except around it. But I don't want to wait for it either. Sometimes there is a delay if the connection has been lost. I would like to know if there is a way that I can free the TOraSession with no further communication to the database.
I know about HALT, but I'd rather avoid it if possible.
Thank you.
Re: Question about disconnect after lost connection
The communication between the Oracle server and client requires that packets are sent and received even on connection loss, thus we cannot change the behavior of our product. As a workaround, you may try to close the connection in a separate thread so the main thread of the application is not delayed.
Re: Question about disconnect after lost connection
ok, thank you Maxim