I need some help with troubleshooting.
When I execute my vbs script in a DOS environment it runs OK. But
when it is called by an asp calling client, it does not work and does
not indicate why.
I put some tracing statements to find out where it errored and it
echoes Point1 and Point2 but never reaches Point 2A. So I guess the
open connection must have failed.
1. What should I do to handle a connection error? On error resume
next seems strange...
2. Is my connection open statement incorrect? What should it be?
3. Again I'm confused when all players are vbs scripts, it runs OK.
When an asp client calls it, it simply does not work.
Thanks
Set objTHoldCon = CreateObject("ADODB.Connection")
Set objTHoldCom = CreateObject("ADODB.Command")
WScript.Echo "Point1"
'Opening the connection
objTHoldCon.Open "audit","sa","password"
WScript.Echo "Point2"
'assigning the command object parameters
Set objTHoldCom.ActiveConnection = objTHoldCon
objTHoldCom.CommandText = "usp_Thresholds_GetStatus"
objTHoldCom.CommandType = adCmdStoredProc
WScript.Echo "StatusHelper Point2a"