washaw
Programmer
- Feb 13, 2008
- 48
I have wriiten this code and when I executed it, I am getting the following error which I spent hours to figure it out but couldn't can somebody help me
Error source Microsoft OLe db provider fro sql server
error description error code 0
error sourcr= Microsoft OLe db provider fro sql server
error description: Time out expired
error on line 30
timeout expired
any suggestion
Thanks
Error source Microsoft OLe db provider fro sql server
error description error code 0
error sourcr= Microsoft OLe db provider fro sql server
error description: Time out expired
error on line 30
timeout expired
Code:
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Function Main()
Dim stpContinuePkg
Dim stpExitPkg
Set pkg = DTSGlobalVariables.Parent
SET stpContinuePkg = pkg.Steps("DTSStep_DTSExecuteSQLTask_5")
SET stpExitPkg = pkg.Steps("DTSStep_DTSActiveScriptTask_2")
Set objCommand = CreateObject("ADODB.Command")
Set objParam = CreateObject("ADODB.Parameter")
Set rsYourRecordSet = CreateObject("ADODB.Recordset")
' set the connection properties to point to the
objCommand.ActiveConnection = "provider=SQLOLEDB.1;data source=myServer;database=myDatabase;Integrated Security=SSPI;"
objCommand.commandtext = "myProc"
objCommand.CommandType = 4
Set objParm = objCommand.CreateParameter("@SprocInputVar", 3,1,,VBScriptInputVar)
objCommand.Parameters.Append objParm
Set objParm = objCommand.CreateParameter("@SprocOutputVar", 3,2,,VBScriptOutputVar)
objCommand.Parameters.Append objParm
objCommand("@SprocInputVar") = 120
set rsYourRecordSet = objCommand.Execute
'to access the output, assign to a variable'
intSprocValue = objCommand.Parameters("@SprocOutputVar")
if intSprocValue = 0 then
stpContinuePkg.DisableStep = True
stpExitPkg.DisableStep = False
Else
stpContinuePkg.DisableStep = False
stpExitPkg.DisableStep = True
end if
Main = DTSTaskExecResult_Success
End Function
any suggestion
Thanks