ADO Connection Object 
Author Message
 ADO Connection Object

Is there a way to have the ADO Connection Object return an event if the
connection to the database is broken?
--

Kent Prokopy



Tue, 14 Oct 2003 06:21:02 GMT  
 ADO Connection Object
The ADO Connection object recognizes a Disconnect event.  Of course you must
declare your object WithEvents to use its events.


Tue, 14 Oct 2003 08:04:52 GMT  
 ADO Connection Object
I have declared the adoConnection Object WithEvents. The InfoMessage returns nothing.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Tue, 14 Oct 2003 20:13:20 GMT  
 ADO Connection Object
You have two options.

1. Use a timer and periodically check the State property of your connection
object.
2. Write a callback procedure that will notify your application if the
connection is lost. The callback proc would also be checking the State
property.

--
regards,
ed  MCP-Visual Basic

Experience is what you get when you
don't get what you wanted.


Quote:
> I have declared the adoConnection Object WithEvents. The InfoMessage
returns nothing.

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Sun, 19 Oct 2003 14:00:36 GMT  
 ADO Connection Object
When a connection is dropped, the state does not change. The app doesn't
know the wire is dead until some activity happens.

Try it. Start an app and disconnect you machine from the network.

 - Tom


Quote:
> You have two options.

> 1. Use a timer and periodically check the State property of your
connection
> object.
> 2. Write a callback procedure that will notify your application if the
> connection is lost. The callback proc would also be checking the State
> property.

> --
> regards,
> ed  MCP-Visual Basic

> Experience is what you get when you
> don't get what you wanted.



Sun, 19 Oct 2003 20:18:16 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Connection Errors via ADO Connection Object

2. Passing ADO Connection object to DLL

3. looping through tables with ADO connection object.

4. ADO Connection object "Keep alive"

5. ON ERROR GOTO does not fire using ADO connection object

6. ADO Connection Object

7. Where to create ADO connection object?

8. Move ADO Connection object to Applictaion level?

9. ADO Connection Object Close and set it equal to nothing

10. problems using OpenSchema method of an ADO connection object

11. Passing ADO Connection Objects in COM+ -How

12. Pass ADO Connection Object back to calling exe

 

 
Powered by phpBB® Forum Software