I have a vbscript that loops through bunch of records, reformats them and loads them into a SQL Server table. It works very nicely. Now I need to fire off a stored procedure right after I hit EOF on the record loading.
However, before I add it to the existing script, I'd like to try firing it off all by itself. The SP doesn't take any parameters and doesn't return any records.
After checking various threads on calling SPs from VBS that I got using the search function, and responding to various error messages, I've come up with:
set server = "10.60.84.61"
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=SQLOLEDB.1; (from existing vbs)
set cmd = Server.CreateObject("ADODB.Command")
with cmd
.activeConnection = objconnection
.commandtext = "exec SPName"
end with
cmd.execute
Now the error message is:
Line 1
Char 1
Error: Object Required: '[String "10.60.84.61"]'
What do I need in VBS to just up and fire off an SP?
However, before I add it to the existing script, I'd like to try firing it off all by itself. The SP doesn't take any parameters and doesn't return any records.
After checking various threads on calling SPs from VBS that I got using the search function, and responding to various error messages, I've come up with:
set server = "10.60.84.61"
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=SQLOLEDB.1; (from existing vbs)
set cmd = Server.CreateObject("ADODB.Command")
with cmd
.activeConnection = objconnection
.commandtext = "exec SPName"
end with
cmd.execute
Now the error message is:
Line 1
Char 1
Error: Object Required: '[String "10.60.84.61"]'
What do I need in VBS to just up and fire off an SP?