
database connection error handling
Normally it will halt with an error if the DSN is not valid -- you must have
"On Error Resume Next" set.
If so, just check for Err=0 after the conn.open statement.
If not, something very strange is happening and we'd need to see more code.
Ken
Quote:
>I'm using the following ADO lines to open a connection with some ODBC
>'datasource'
>Set conn = Server.CreateObject("ADODB.Connection")
>conn.open datasource, "", ""
>....
>sql = "SELECT ..."
>...
>Set rs = Server.CreateObject("ADODB.Recordset")
>rs.Open sql, conn, 3, 3
>When the 'datasource' is invalid, my NT 4.0 server easily gets into
>infinite loop (inetinfo.exe)...
>Is there any easy way for me to check whether the 'datasource' is
>valid? Or does 'conn.open/rs.open' ever returns any error message?
>Thanks a lot!
>Julie