Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
If disconnect how can i trigger this event display messa
Message
De
27/08/2011 00:45:10
 
 
À
26/08/2011 22:21:16
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:
01521975
Vues:
31
>ok, thank you for reply me.You mean SqlConnection.open in before ,i will need to try .... Catch .....End Try.
>But if i use dataset, TableAdapterManger then how to handle or not? Thank you
>
>
>
>
> Me.TableAdapterManager.UpdateAll(Me.MyDataSet)
>


I don't use TableAdapter, but you can put that call in a try/catch block, and catch for SqlException. Take a look at the MSDN article on SqlException:

http://msdn.microsoft.com/en-us/library/686y883x.aspx

Also, you might want to do a Google search on .NET SqlException. I found several blogs on the topic ... so, do a little reading there, you'll probably find some good ideas.

~~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