Check if connection up

Results 1 to 2 of 2

Thread: Check if connection up

  1. #1
    Join Date
    Dec 1969

    Default Check if connection up

    Can ASP somehow check, when connecting to a db (dsn/less), whether the connection is successful? eg something like:<BR><BR>if <BR>oConn.Open "Provider=MySQLProv;" & _<BR> "Data Source=mySQLDB;" & _<BR> "User Id=myUsername;" & _<BR> "Password=myPassword"<BR>else<BR>oConn to another connection (ie a slave server)<BR><BR>or die (similiar to php)<BR><BR>Is this kind of functionality possible? Thanks!

  2. #2
    Join Date
    Dec 1969

    Default Use the error handler...

    If the connection fails, it&#039;s going to throw an error. You can use that error code in the error handler to try another connection.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts