We get the following error when we excute an sql sp that returns no records on the rstemp.close statement in the code below. The sp runs fine and if we comment out that statement, it works without error but is that leaving the connection open? Or, is there a way to tell it that no records will be returned. Thanks, Joe
Error Type:
ADODB.Recordset (0x800A0E78)
Operation is not allowed when the object is closed.
---------------------------------------------------
code:
strconn="PROVIDER=MSDASQL;DRIVER={SQL Server};"
strconn=strconn & "SERVER=xxxxxx1;DATABASE=northwind;"
strconn=strconn & "UID=xxxxx;PWD=xxxxxxx;"
mySQL="testjobfromweb"
dim conntemp, rstemp
set conntemp=server.createobject("adodb.connection"
conntemp.open strconn
set rstemp=conntemp.execute(MySQL)
conntemp.close
rstemp.close
set rstemp=nothing
conntemp.close
set conntemp=nothing
Error Type:
ADODB.Recordset (0x800A0E78)
Operation is not allowed when the object is closed.
---------------------------------------------------
code:
strconn="PROVIDER=MSDASQL;DRIVER={SQL Server};"
strconn=strconn & "SERVER=xxxxxx1;DATABASE=northwind;"
strconn=strconn & "UID=xxxxx;PWD=xxxxxxx;"
mySQL="testjobfromweb"
dim conntemp, rstemp
set conntemp=server.createobject("adodb.connection"
conntemp.open strconn
set rstemp=conntemp.execute(MySQL)
conntemp.close
rstemp.close
set rstemp=nothing
conntemp.close
set conntemp=nothing