I managed to setup connection to mssql db thru odbc and able to select and update. The script is running under xp and in vmware.
My issues is sometime the db connection id disconnected. and win will display some dialog box.
My question is, how do I determine whether the db connection is still active or not before issues any exec command in vbscript. Any help is welcome.
regards
How to detect Connection to Db is disconnected
Moderators: JRL, Dorian (MJT support)
if your database connection is somewhat unreliable, you should just include a line or two of VBScript to ensure the connection exists before you try an operation on the database. More than likely, you are getting the "pop up" because you are trying to move the cursor, Read a record, etc...to a closed connection.
could you post a little of your VBScript? It might help us find the problem.
could you post a little of your VBScript? It might help us find the problem.
It can happen anywhere
It can happen in any part of the script which try to execute sql. Sometimes it run for days without disconnection. Ilike your idea of checking is connection is up or down. How do you this in vbscript?