Hi, I get confused, code(1) does not cause error, but code (2) cause error. If I put actual field names,it work, but when I use the position in the rst collection does not work for the second field. Can any one help to know why doest not work. in Wrox book "asp 3.0 page 339", shows that I can use one of the following and it will work:
rst.fields("state_id"
.value
rst(""
.value
rst(1).value
rst.fields(1).value
--------------------
While Not rs.EOF
response.Write "<option value='"& rs.fields(1).value& "'>"& rs.fields("state"
.value&"</option>"
rs.MoveNext
Wend
Code (2)
While Not rs.EOF
response.Write "<option value='"& rs.fields (1).value& "'>"& rs.fields(2).value&"</option>"
rs.MoveNext
Wend
Thanks for your hlep
rst.fields("state_id"
rst(""
rst(1).value
rst.fields(1).value
--------------------
While Not rs.EOF
response.Write "<option value='"& rs.fields(1).value& "'>"& rs.fields("state"
rs.MoveNext
Wend
Code (2)
While Not rs.EOF
response.Write "<option value='"& rs.fields (1).value& "'>"& rs.fields(2).value&"</option>"
rs.MoveNext
Wend
Thanks for your hlep