存储过程如下:
--此存储过程实现删除用户的全部数据,包括竞价排名数据、信息发布数据等等
create procedure delUser(
@userId int,
@result varchar(10) output
)
as
set nocount on
if @userId=null or @userId=''
begin
set @result='参数传递错误,用户帐号丢失.'
return
end
else
begin
delete from [User8517,jjKeyWords,leaveMes,message] where(user8517.userId=@userId and jjKeyWords.jjKeyEmail=user8517.userEmail and leaveMes.lMesEmail=user8517.userEmail and message.MesEmail=user8517.userEmail)
set @result='删除成功!'
end
GO
调用如下:
UserID=cint(request.querystring("UserID"))
set cmd=server.CreateObject("ADODB.Command")
with cmd
.activeConnection=conn
.commandType=4
.commandText="delUser"
.prepared=true
.parameters.append .createParameter("@userId",3,1,,UserID)
.parameters.append .createParameter("@result",200,2)
.execute
end with
set cmd=nothing
response.write cmd("@result")
提示错误如下:
不正常地定义参数对象。提供了不一致或不完整的信息。
/admin/UserFunction.asp, 第 36 行(即.parameters.append .createParameter("@result",200,2))
请指教