I am building an application which retrieves data from an sql server. The specifications are the app to be running in either one or more machines which, however, are in the same LAN with the one that the sql server is hosted. 5 days ago I faced the situation about what would happen if for some reason the network cable of either one of the computers that run the app, or the computer that hosts the sql server, gets unplugged. I realized that the application gets frozen and then Delpi-7 produces error messages. Eventually the app terminates in an unfriendly way.
I tried to find a way to handle this event trough the "connection:= false" of the ADO1 control or through the table events that the applications was retrieving at the time of disconnection but unfortunately I failed.
So I am asking whether there is a way to detect when the LAN network cable - or the connection with the sql server - gets loose, so to show a message to the user to inspect his connections and - In the worst scenario - to end the application in a more friendly way (e.g. using the "application.terminate" command).
Thank you in advance