当我尝试使用经典的asp代码执行存储过程时,我抛出了这个错误:
ADODB.Command error '800a0d5d'
Application uses a value of the wrong type for the current operation.
这是编译器抱怨的行:
cmdStoredProc.parameters.append cmdStoredProc.createparameter("@Comments",201,1,16,strComments)
@Comments是sql db type'text'。
存储过程需要此参数:
@Comments text = null
我做了一些响应写入行调试,并确保应用程序到达上面的行,所以这个参数有问题。
你们认为在我的情况下为'text'类型声明存储过程参数有什么错误吗?
谢谢,Laziale
答案 0 :(得分:0)
已在SQL Server上定义了存储过程...无需附加参数,只需设置它:
cmdStoredProc.parameters("@Comments") = strComments
Set rsTheResultingRS = cmdStoredProc.Execute
...假设这是唯一的参数。
至少,这是我当前运行的服务器调用SP的方式。