Re-connecting to a Database and table after the connection is dropped
Posted on 1998-09-29
Hello All ! I have a Delphi 1.0 app that is running against SQL-AnyWhere 22.214.171.124 Build 1867. The database does not have the -i option set which means the default for that option is in effect: that is, connections that are idle for four hours are disconnected.
But, lets say my user clicks the "refresh" button, five hours after the app has been idle. Now, they get an error message that says:
"General SQL error [Sybase][ODBC Driver]
Connection not open;not connected to database"
Instead of getting/seeing that message, I want to handle the error and re-connect to the database and tables for the user without them knowing it or seeing it, and I want to refresh the app's data. Can anyone offer advice?