ADODB.Recordset 错误 '800a0e78' 对象关闭时,不允许操作。 很奇怪的问题
新建一个存储过程
CREATE PROCEDURE test
@id int
@typeid nvarchar(20)
as
if @typeid='h1'
begin
update table1 set a1=a1+1 where id=@id
select a1 from table1 where id=@id
end
if @typeid='h2'
beign
update table1 set a2=a2+1 where id=@id
select a2 from table1 where id=@id
end
现用下面的语句就出错
set rs=server.createobject("ADODB.Recordset")
sql="execute test "&id&",'h1' "
set rs=conn.execute(SQL)
if not rs.eof and not rs.bof then '提示说这一行出错。
total=rs(0)
end if
rs.close
set rs=nothing
请问一下是什么原因呢,谢谢。