vbscript 调用存储过程方法?请真正调多得给看看我的不完全代码
搜索了半天vbscript 调用存储过程方法,真是种类繁多花样百出,东拼西凑写了这么多,编译通不过,请真正用vbscript调过存储过程的兄弟们给指点指点啦!
<BODY>
<SCRIPT language= "VBScript ">
On Error resume next
Dim ParamValue
ParamValue = "8af652c312b28b160112b2d4d526000b "
Dim sParamName
sParamName= "1 "
Dim CNN
Dim COM
set COM = CreateObject( "ADODB.Command ")
set CNN = CreateObject( "ADODB.Connection ")
CNN.ConnectionString = somecstr
CNN.Open
COM.ActiveConnection = CNN
COM.CommandText = "sp_exp_change_detail_status "
COM.CommandType = 4
COM.Parameters.Append COM.CreateParameter( "@draw_detail_id ",adVarChar,adParaminput,20)
COM.Parameters.Append COM.CreateParameter( "@status ",adVarChar,adParaminput,1)
if err.Number <> 0 then
MsgBox "2 " &err.Description
end if
COM.Execute
if err.Number <> 0 then
MsgBox err.Description
end if
</SCRIPT>
</BODY>
msgbox2处报错,一定是我配置参数的时候配错了。
[解决办法]
Dim CNN
Dim COM
set CNN = CreateObject( "ADODB.Connection ")
CNN.ConnectionString = somecstr
CNN.Open
set re=con.Execute( "exec sp_exp_change_detail_status '值1 ', '值2 ' ")