David Svedarsky
asked on
Display error message when BindingNavigatorSaveItem is used with server off
In a windows application using visual studio 2005 and sql server 2005:
I need sample code to display an error message when the BindingNavigatorSaveItem is used with the server is off or disconnected.
I find that a user can press the BindingNavigatorSaveItem button and think the database is updated when the server is off or disconnected - when actually it is not updated.
Thanks!
I need sample code to display an error message when the BindingNavigatorSaveItem is used with the server is off or disconnected.
I find that a user can press the BindingNavigatorSaveItem button and think the database is updated when the server is off or disconnected - when actually it is not updated.
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Why not testing the connection (kind of pinging the server) at the very beginning of this event handler.
This code was not supposed to be THE solution but the point where starting doing something.
This code was not supposed to be THE solution but the point where starting doing something.
ASKER
kaylanreilor,
Your first post answered the question - I had overlooked something very obvious.
Thanks!
Your first post answered the question - I had overlooked something very obvious.
Thanks!
ASKER
Thanks for the response.
I have tried this code.
When I open the form, then stop the server and try to update -
I get the message ("Update successful") instead of ("Update failed").
I have done the 'Googleing' on this.
Any other ideas?