Re: What does the .run method return
- From: deepal.82@xxxxxxxxx
- Date: Wed, 20 Aug 2008 05:42:54 -0700 (PDT)
The short answer is NO. I say that because your sample executes a VBS
script, not a database stored procedure. VBS scripts can output text
to a console window or GUI message box. But, they do not create
output parameters.
However, I am confused by your question. In one place you reference
'stored procedure', yet your example is a VBS script. Does your
script connect to a database in which there is a stored procedure?
Personally, I would need to see a snippet of code from that script and
have a better explanation of what exactly you're trying to accomplish
before I could comment further.
Tom Lavedas
===========http://members.cox.net/tglbatch/wsh/
I have a batch job that calls a VBscript. This Vbscript connects to
the database and calls the stored procedure. The stored procedure
takes one input parameter and returns only one row with 2 column. both
the columns are integer.
Please find the code below
Batch job. Call to the VBscript
Dim ret
set ws = Wscript.CreateObject("Wscript.Shell")
ret = ws.run("\\C\Delete_Data.vbs SQL024301 Taurus_ NT NT Config_New 3
0",7,true)
wscript.quit ret
VBscript.. pasting only the main function not all of them
'Main procedure
Sub delete_data
WriteLog "Calling stored procedure
Product_DeleteReqItemResErr ..."
On Error Resume Next
Dim objCmd
set objCmd = CreateObject("ADODB.Command")
' set rs = CreateObject("ADODB.RecordSet")
With objCmd
.ActiveConnection = Scn
.commandtimeout = 9000
.CommandText = "test_Product_DeleteReqItemResErr"
.CommandType = 4
.Parameters.Append .CreateParameter("date_diff_days", 3, 1)
End With
rs = objCmd.Execute
' If Not rs.EOF Then
' outTotalConfigId = rs.Fields(0)
' outTotalBundleId = rs.Fields(1)
' End If
Scn.CommandTimeout = 600
On Error Resume Next
If Err.Number <> 0 Then
WriteLog Err.Description & " (" & Err.Number & ")"
FatalError
End If
On Error Goto 0
WriteLog "Product Config Deletion Success!"
Writelog " Product Config Deletion Exit code is 0 "
Closedown
Wscript.quit 0
End sub
Thanks
Deepal
.
- Follow-Ups:
- Re: What does the .run method return
- From: Richard Mueller [MVP]
- Re: What does the .run method return
- References:
- What does the .run method return
- From: deepal . 82
- Re: What does the .run method return
- From: deepal . 82
- Re: What does the .run method return
- From: Pegasus \(MVP\)
- What does the .run method return
- Prev by Date: Re: Can i read the value from a .properties file
- Next by Date: Execute error: Type Mismatch: 'Execute'
- Previous by thread: Re: What does the .run method return
- Next by thread: Re: What does the .run method return
- Index(es):
Relevant Pages
|
Loading