Hi everyone,
I am relativly new to asp and am having a problem with a loop.
This is my select statement:
- strSql = "SELECT newsletters.*, homePage.*, pointsTable.*, pointsTable.for-pointsTable.against as gd FROM newsletters, homePage, pointsTable ORDER BY pointsTable.points DESC, pointsTable.for-pointsTable.against DESC;"
This works perfectly when the loop code is taken out, but when it is in it creates 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.
-
-
/index.asp, line 0
I understand that it is trying to tell me there is no records in that field, but what I can't ubderstand is that if the loop is not there it works and if it is there it doesen't, frustrating!
Below is the looping code:
- <%if NOT rscuafc.eof then
-
do until rscuafc.eof%>
-
<tr>
-
<td bgcolor="#E6E6FF"><img src="images/spacer.gif" width="1" height="2"></td>
-
.
-
.
-
.
-
.
-
<td bgcolor="#CCCCCC"><img src="images/spacer.gif" width="1" height="1"></td>
-
</tr>
-
<%rscuafc.MoveNext
-
Loop
-
Else
-
response.write "Sorry, there are no records."
-
End If%>
any help would be greatly appreciated!
Thanks in advance.