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!

Errors- in populating a dropdown

Status
Not open for further replies.

burningblue8

Programmer
Jul 24, 2002
8
GB
The code I have got is the following and apart from staring at the screen for the past twenty minutes trying to figure this one out, I bet it is something simple:
All I am trying to do is populate a drop down box from a field in the db.



<font size=&quot;2&quot;><b><font size=&quot;2&quot; face=&quot;Verdana&quot;>Source <select id=source name=source>

<%
Set conn = server.CreateObject (&quot;ADODB.connection&quot;)
conn.Open Session(&quot;hfr_connectionstring&quot;)
Set rs = server.createobject (&quot;ADODB.recordset&quot;)
lssql = &quot;select source from booking&quot;

rs.open lssql, conn

Response.write rs.fields.count
while not rs.EOF    
Response.Write  &quot;<option value = &quot;& rs.fields(4).value & &quot; >&quot;
rs.movenext
wend

set rs = nothing
set conn = nothing

%>
</select>

the simple things are always the most annoying!!!

 
Code:
Response.Write  &quot;<option value = &quot;& rs(&quot;source&quot;) & &quot; >&quot;
Tony
reddot.gif WIDTH=400 HEIGHT=2 VSPACE=3

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top