D
Dima Protchenko
Hi, guys.
Please help if you know something about this.
Error:
ADODB.Recordset error '800a0e78'
Operation is not allowed when the object is closed.
line: if not rs.EOF then (from the code below)
I have an SP on SQL2k that returns a recordset after a few data
manipulations. The code for the SP is too long to attach here, but to
describe it - it extracs some data from the db, stores it in the temp table
(#), then does some data manipulation in that temp table and at the end of
it I have:
select * from #Courses
drop table #Courses
which returns my recordset. On yeah - and I DO have SET NOCOUNT ON at the
top of the SP
Now on the asp page I have this:
dim conn, rs
set conn = Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.Recordset")
conn.ConnectionString = "Provider=SQLOLEDB; server=**; Initial Catalog=SAGE;
uid=**;pwd=**;"
conn.Open
rs.Open "exec dbo.usp_FindOneClass '15','2'", conn, adOpenDynamic, 1, 1
if not rs.EOF then
rs.MoveFirst
do while not rs.eof
Response.Write(rs("CourseID"))
rs.MoveNext
loop
end if
if rs.state = adStateOpen then rs.close
set rs = nothing
conn.Close
set conn = nothing
This is all pretty straight forward and I know it runs with the other SP
that I have. SP runs fine by itself in QA too. But I still get the recordset
error. Please help if you know the answer.
Thanks
Please help if you know something about this.
Error:
ADODB.Recordset error '800a0e78'
Operation is not allowed when the object is closed.
line: if not rs.EOF then (from the code below)
I have an SP on SQL2k that returns a recordset after a few data
manipulations. The code for the SP is too long to attach here, but to
describe it - it extracs some data from the db, stores it in the temp table
(#), then does some data manipulation in that temp table and at the end of
it I have:
select * from #Courses
drop table #Courses
which returns my recordset. On yeah - and I DO have SET NOCOUNT ON at the
top of the SP
Now on the asp page I have this:
dim conn, rs
set conn = Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.Recordset")
conn.ConnectionString = "Provider=SQLOLEDB; server=**; Initial Catalog=SAGE;
uid=**;pwd=**;"
conn.Open
rs.Open "exec dbo.usp_FindOneClass '15','2'", conn, adOpenDynamic, 1, 1
if not rs.EOF then
rs.MoveFirst
do while not rs.eof
Response.Write(rs("CourseID"))
rs.MoveNext
loop
end if
if rs.state = adStateOpen then rs.close
set rs = nothing
conn.Close
set conn = nothing
This is all pretty straight forward and I know it runs with the other SP
that I have. SP runs fine by itself in QA too. But I still get the recordset
error. Please help if you know the answer.
Thanks