View Single Post
Old 08-31-2018, 12:43 PM
rojam rojam is offline
Senior Member
Join Date: Jun 2015
Posts: 195

If you are connecting to a remote database, I wouldn't keep an active connection to the database. Do the connection, run the operation (query, update, insert) and disconnect.

If you still want to persist the connection, did you try using the Application's OnException event? Drop a TApplication on your main form, select the OnException Event, write code to handle that specific exception. Be aware that if you don't specify which exception, then ALL previously un-handled exceptions will be handled by this event.
Reply With Quote