Hi, guys. How are you?
I have been having a problem about EOF things.
I made a couple of dropdown box which user can query what they need quickly.
So SQL statment is dynamic, which is cool.
But sometimes those query itself doesn't pick up any data cuz it is simply not existing.
I want to show "No Product found" if query doesn't pick up any data otherwise, "You've found".
What I did is following:
code:
<table><tr><td><%If rs.EOF Then%>No Product found!<%Else%>You've foound:<%End IF%></td></tr></table>
<div style="display:<%If rs.EOF Then%>none<%End IF%>">
<table align="center">
<%If Not rs.EOF Then%>
<%Do Until rs.EOF or recct >= maxrecs
<!-- here makes table body -->
Loop
End If
%>
</table>
What I meant was:
1. If data doesn't exist, get "No product found" otherwise "You've found"
This part works fine.
2. If data doesn't exist, don't do Do until Loop.
I guess this bit is causing error. Not sure how to deal with this.
Well, at the moment it works fine as long as data exist. But when not exists, just cause error.
It said:
quote:
ADODB.Recordset (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
Hmm......Do you see something wrong???
Please tell me.
Cheers.
Hiroki Kozai