Hi,
I have some VBA code that connects to a SQL Database that's on an internal network. This code does other things where they don't need access to the Database. So, when an individual is at home, I'd like to be able to detect in the quickest way possible whether they can reach the Database or not.
Right now, my code catches the error when it tries to open the connection. When it can't find the DB, it returns the error:
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access is denied
If they're on the network or have a VPN connection, it normally takes under a second to connect, but this error takes 11 seconds, so I'd like to find a way to make it error out sooner.
Bookmarks