I have a program which first looks for a SQL db, if that db is offline, it switches to a local copy in Access located on the PCs harddrive. The problem I'm having is finding a way to test for the actual connection to the SQL db. I am using ADO and attempt to connect to the SQL db by using the .open command on my connection; however, if the SQL db is offline, the error that is returned is being returned from ADO and cannot be trapped from within my VB code.

Does anyone know of a way to do this?