Unanswered: Detecting if SQL-server is down in Ms Access 97
I have developed some kind of front-/back end database. The back end DB collects all data from an SQL server that is relevant to me and converts it to the format that I need. This DB updates daily. The problem is that I first have to run a bunch of delete queries and then append queries to update all tables, and when the SQL server is down, all data is deleted and no new data can be appended. This means the whole DB is down. Is there a way to detect if the SQL-server is down/running before I start deleting all old data?
Try performing a SELECT statement on a small SQL Server table before the deletion routine. If the table is a available without error, proceed with the delete / insert code, otherwise abort and ask the user to try later.
This works indeed, but the problem is that you get a SQL server login error, which is a non-Ms Access error, and after that you get a SQL server login pop-up, also non-Ms Access! So you can't display a customized error message in Ms Access. Isn't there a way to avoid getting this SQL login error while testing if the server is online?