Click here to Skip to main content
15,885,895 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All,
I want to Update database if network cable is unplug , I caanot understand how to manage this .

What I have tried:

tried google but not getting proper answer
Posted
Updated 4-Jul-16 5:16am

1 solution

I guess the database is on your network, on a server.
Quote:
I want to Update database if network cable is unplug , I caanot understand how to manage this .
Simple, you don't.
You communicate between you PC and the server by the network cables, When you unplug the cable, you cut the link. No program can replug the cable. your app will abend with a faillure to communicate with the server, no matter what.

All the things you can do is replug the cable in hope the app is still awaiting an answer and have not timed out.
 
Share this answer
 
Comments
Raj tilak Bose 4-Jul-16 11:20am    
Means do i need to write a schedular ?
Raj tilak Bose 4-Jul-16 11:21am    
Means i want to unlock the row after a time so other user can update .
Patrice T 4-Jul-16 11:30am    
It depend on your server.
On server side, you must wait until the session with your PC timeout, and at this point only the server will close the connexion and free the locks and close all files assiciated with your PC.
If repluged before timeout, everything will continue as if nothing append.
Raj tilak Bose 4-Jul-16 11:34am    
thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900