I've made a program for a client that records live transactions into their MS Sql server database. When the SQL Server goes down, the program will go into an 'Offline Mode', storing the transactions locally. I want the program to be able to automatically check if the sql server is back up and (if it is), record these transactions it stored locally.
I tried doing this through a timer, but the program comes to a halt for about 30secs, when it's trying to reconnect to the sql server and the sql server still isn't there.
Any suggestions how I can quickly check if it's available. I'm using the dbexpress components and just trying to open the sqlconnection again to see if it can re-connect