I want my script to tell me, if the login to the database has failed with a custom response.write() and then continue with my script. Is this possible?
Say I have this:
set conn = server.createobject("adodb.connection")
dsn = "Provider = sqloledb; Data Source = XX; Initial Catalog = XX; User Id = XX; Password = XX
conn.connectiontimeout = 300
conn.commandtimeout = 300
if conn.state = 0 then
conn.open dsn
end if
If the conn couldn’t be opened because of bad Data Source, User Id or Password, then I want it write me a message with response.write() and then CONTINUE with the rest of the script, or else it should do my sql-actions AND THEN continue 🙂
1 Answer