SQL db类型的注释和经典的ASP存储过程



当我尝试使用经典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数据库类型'text'。

存储过程需要这个参数:

@Comments text = null

我做了一些响应写行来调试,并确保应用程序到达上面的行,所以这个参数有问题。

在我的情况下,您认为为'text'类型声明存储过程参数是错误的吗?

存储过程已经在SQL Server上定义…不需要附加参数,只需要设置它:

cmdStoredProc.parameters("@Comments") = strComments
Set rsTheResultingRS = cmdStoredProc.Execute

…假设这是唯一的参数

至少,这是我当前运行的服务器调用sp的方式。

最新更新