MySQL Forums
Forum List  »  Connector/ODBC

Connection Error Checking
Posted by: Andrew Grieve
Date: January 27, 2005 02:53PM

Hello

I want to check if my mysql is down every time i connect to the database (not everytime i run a query).
I'm wondering if there is anyway to check if your connection string has actually connected, without doing an error hanling check on an execute?

dbconn = "Driver={MySQL ODBC 3.51 Driver};server=localhost;uid=something;pwd=something;database=somethingt"

In php, you can use the command die()

"$link = mysql_connect( $server, $user, $pass );
if (!$link)
die('A connection to the mySQL
server could not be established');"

But I'm using ASP, (the old version of Asp, not asp.net)

Does anyone have an idea?

Thank you
Andrew

Options: ReplyQuote


Subject
Written By
Posted
Connection Error Checking
January 27, 2005 02:53PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.