How to catch ODBC failure ?
Posted on 1998-10-22
I am using an ODBC connection to an SQL Server Database in my MFC app (VC++ 5.0 Enterprise). My program is running overnight, so it has to operate totally unattended. I need a way of trapping the error if the SQL DB is down and writing an error message to my app's log file.
How and where can I test if the ODBC connection was successful or failed ? In other words, where to test the result of the GetDefaultConnect procedure ?
Thanks a lot,