Invalidated ADO Connection Object
-
Hi, Anybody knows how to know if an ADO connection has been disconnected even before you execute anything? I have an application which has a global connection object and when it was disconnected from the server for whatever reason, it raises an error when you execute something even if the connection has been restored. Is there a way which I could know if the connection is still valid before I even execute anything? Thanks SDE
-
Hi, Anybody knows how to know if an ADO connection has been disconnected even before you execute anything? I have an application which has a global connection object and when it was disconnected from the server for whatever reason, it raises an error when you execute something even if the connection has been restored. Is there a way which I could know if the connection is still valid before I even execute anything? Thanks SDE
-
alex1205 wrote:
know if an ADO connection has been disconnected even before you execute anything?
You can check the connection state. State Property (ADO)[^]
DEBUGGING : Removing the needles from the haystack.
-
Hi, Thanks for the response. I've tried that and it doesn't work. I also tried looking at the error count but it doesn't report any. :) SDE
alex1205 wrote:
Thanks for the response. I've tried that and it doesn't work.
Oh, sorry about that. I take it the Connection State is showing the connection is still active?
alex1205 wrote:
it raises an error when you execute something even if the connection has been restored.
In the original post you mention the next time you execute a query it throws an error. What is the error message it throws when this happens?
DEBUGGING : Removing the needles from the haystack.