Error Type: ADODB.Recordset (0x800A0BCD)

C

Chuck

Hi!

I have a ASP page that generates an excel report. It works fine if there are
records found, however, if no records are found I would like to call the
below listed function instead of getting the following error that I am
presently receiving:

Error Type:
ADODB.Recordset (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested
operation requires a current record

' Move to the first record
rs.movefirst <------- Errors here
if rs.eof then 'new code

' Start a loop that will end with the last record
do while not rs.eof
...
' Move to the next record
rs.movenext
' Loop back to the do statement
loop
else 'new code
call norecordsfound() 'new code
end if 'new code
%>

Thank you in advance.

Chuck
 
R

Ray at

You don't need to use rs.Movefirst anyway, since it'll start at the
beginning. But, your issue is that there are no records in your recordset.

If Not rs.EOF Then
'''your looping code
Else
response.write "There are no records."
End If

Ray at work
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top