Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP

Status
Not open for further replies.

krappleby025

Programmer
Sep 6, 2001
347
NL
ok i have a database i am retrieveing records from and this is the code i am using

<% Set level1= con.execute(&quot;SELECT * FROM representatives WHERE sponsersrepid=&quot; & repmain(&quot;repnumber&quot;))
Do while level1.EOF
level1.movenext
loop
%>

now the connection and retrieval works, but some records do not exist and i am getting the following error

ADODB.Field error '80020009'

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

/test.asp, line 0

this is because their is no record, how can i stop this

thanks

 
Do a check before your do...while loop for EOF.

Add: If Not level1.EOF Then
(Your Do...While Loop code)
Else
(Display a message - no records exist)
End If

Hope this helps.
Rich
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top