Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
If disconnect how can i trigger this event display messa
Message
From
26/08/2011 11:41:22
 
 
To
26/08/2011 04:44:09
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
Network:
Windows XP
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01521852
Message ID:
01521907
Views:
35
>I want to prompt a message box when the program is disconnect to Database. I should how to trigger this event in right method?
>Or i should use try...catch ex as exception ....End try in any connection fuction, but how to compare disconnect condition,because exception any
>error will run?


Catch the exception when you try to open the connection. You don't need to specify any particular error in your catch ... any error at all will mean you can't connect.

~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform