Link to home
Start Free TrialLog in
Avatar of jenmat
jenmat

asked on

Execute stored procedure in ActiveX script (vb script) in a SQL job

Hi,
is this the right way to run a stored procedure from ActiveX script (vb script) in a SQL job?
----------------------
Set cmdSp = CreateObject("ADODB.Command")
cmdSp.ActiveConnection = "Provider=SQLOLEDB;Server=xxx.xxx.xxx.xxx;database=dbPassetData;network=DBMSSOCN;uid=PassData;pwd=jH783Rew"
cmdSp.CommandText = "Dp_Adm_Select_MobileInfoToXml"
cmdSp.CommandType = 4
CmdSp.Parameters.Append CmdSp.CreateParameter("@C1ID", 3, 1,, 461)
CmdSp.Parameters.Append CmdSp.CreateParameter("@LID", 3, 1,, 1)
set RS = CmdSp.Execute
dim arrGuideJava: arrGuideJava = RS.GetRows()
RS.Close
set RS = nothing
set CmdSp = nothing
---------------------

/ jenmat
Avatar of junglerover77
junglerover77

set adoConn= CreateObject("ADODB.Command")
adoConn.connectionstring = "Provider=SQLOLEDB;Server=xxx.xxx.xxx.xxx;database=dbPassetData;network=DBMSSOCN;uid=PassData;pwd=jH783Rew"
adoConn.open

Set cmdSp = CreateObject("ADODB.Command")
set cmdSp.ActiveConnection = adoConn
ASKER CERTIFIED SOLUTION
Avatar of junglerover77
junglerover77

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial