I have a Windows app that connects to a MSSQL database to view/update data. My app throws an OLEException when Windows 7 returns from sleep mode. The exception occurs when I try to execute a SQL command to the database. The specific error is “{ConnectionWrite(send()).] General netwrok error. Check your network documentation., (failed on “Open”) Exception Error Number: -2147352567” It appears that connection to the database is gone, but my app doesn’t know that. I tried checking for a Nil database and checking the connection state but these are showing that the connection is still there.
Does anybody have an thoughts on how to either detect the return from sleep Windows event (then I can re-establish the connection) or catch the exception, re-establish connection, and then resume execution at the line that caused the error (is this even possible?)?
I using Xojo v2014 Release 2, Windows 7, the MSSQL connection is established using OLEObject(“ADODB.Connection”)
– Rob