初学存储过程,取存储过程的输出参数的值时老报错。
存储过程
CREATE PROCEDURE getuserpwd3
@id int,
@id2 int out
AS
begin
select @id2=zijin from users where id=@id
end
GO
调用代码
set comm = server.CreateObject("adodb.command")
comm.commandType = 4
set comm.activeconnection = conn
comm.commandtext = "getuserpwd3" '数值型参数输
comm.parameters.append comm.createparameter("@id",3,1,4,"68458")
comm.Parameters.Append comm.CreateParameter("@id2",3,2)
comm.execute()
response.Write comm("@id2")
执行的时候老说‘不正常的定义参数对象,提供了不一致或不完整的信息’