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="TEXT" NAME="codigo" SIZE=40
<%if not (RS.EOF and RS.BOF) then%>
VALUE=<%=RS("codigo"
%>>
<%end if%>
When RS is empty I get an error.
Somebody can tell me how to do this properly?
Thanks!
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="TEXT" NAME="codigo" SIZE=40
<%if not (RS.EOF and RS.BOF) then%>
VALUE=<%=RS("codigo"
<%end if%>
When RS is empty I get an error.
Somebody can tell me how to do this properly?
Thanks!