用asp执行存储过程求救!!

proc_get_ysrtm0827 为存储过程名称
有两个输入参数 分别为int datetime
现在我执行到
set tmpfist=cmd.CreateParameter("lwbh",adUnsignedInt,adParamInput,4)
这句提示我
Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

/iisHelp/common/500-100.asp,行242

ADODB.Command 错误 '800a0bb9'

参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。

/cwk/scdw/income/JS_YJSR.asp,行31

不知道是否是类型设置的不对,请告诉我,
第二个参数我想设置为null ,该怎么设置!!!

---------------------------------------------------------------

set tmpfist=cmd.CreateParameter("lwbh",adUnsignedInt,adParamInput,4,"这里缺了一个参数")
---------------------------------------------------------------

set tmpfist=cmd.CreateParameter("lwbh",adUnsignedInt,adParamInput,4,"")

---------------------------------------------------------------

不用创建参数,直接用,如下所示:
Set cmd = New ADODB.Command
With cmd
.ActiveConnection = Connection
.CommandText = "proc_get_ysrtm0827 "+cstr(@sjlw_bh)+",'"+cstr(@kjqj)+"'"
set rs=.Execute
End With
---------------------------------------------------------------

adUnsignedInt = 19
adParamInput = 1
adDate = 7
---------------------------------------------------------------

具体你可以看
C:\Program Files\Common Files\System\ado\adovbs.inc

Published At
Categories with Web编程
Tagged with
comments powered by Disqus