We have an application that pulls data from several servers, and one of the external servers that we don't have control of went down recently. When our code attempted to open the connection string to that server, it pulled our entire application down.
So I need to know how to check that a connection is working first *before* attempting to open it, so that it won't bring everything else down with it. here is what the connection string looks like:
Code:
Dim strConn As String
strConn = "Provider=SQLOLEDB; Data Source=SERVERNAME; Initial Catalog=DATABASENAME; User ID=USERID; Password=PASSWORD"
And here is the line of code that had the error:
Code:
objConn = Server.CreateObject("ADODB.Connection")
objConn.Open (strConn) '<<<----- ERROR OCCURRED HERE!!!
And and all help is appreciated.