sql="declare @medicineyz_total_id_return int;exec medicineyz_add '"&bedid&"',@medicineyz_total_id_return output;select max(@medicineyz_total_id_return) as medicineyz_total_id_return;"
set rs=conn.execute(sql)
if not rs.eof then
medicineyz_total_id=clng(rs(0))
end if
第三行:出错:ADODB.Recordset (0x800A0E78)
对象关闭时,不允许操作。
------解决方案--------------------
sql开头加上 SET NOCOUNT ON;试试看