Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
If disconnect how can i trigger this event display messa
Message
De
26/08/2011 11:41:22
 
 
À
26/08/2011 04:44:09
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
Network:
Windows XP
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01521852
Message ID:
01521907
Vues:
37
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform