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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with empty RecordSet

Status
Not open for further replies.

alexxx

Programmer
Jul 3, 2002
1
VE
Hi!
I want to insert the value of a query into a text box, but the recordset might be empty. So I want that if this happens the text box keeps empty.
The code I have tried is the following:

<INPUT TYPE=&quot;TEXT&quot; NAME=&quot;codigo&quot; SIZE=40
<%if not (RS.EOF and RS.BOF) then%>
VALUE=<%=RS(&quot;codigo&quot;)%>>
<%end if%>

When RS is empty I get an error.
Somebody can tell me how to do this properly?
Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top