Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Loading a dropdown control
Message
De
01/01/2004 04:31:54
 
 
À
31/12/2003 17:27:31
Jaime Vila
Miami Children's Hosp. - Radiology
Miami, Floride, États-Unis
Information générale
Forum:
Internet
Catégorie:
Active Server Page
Divers
Thread ID:
00863226
Message ID:
00863253
Vues:
7
Here is a quick sample for you to load the dropdown from the access table.
Assuming that you have already established a connection to database, lets say object name is con.
Now Define a recordSet in your ASP page and populate the drop-down
< %
sql="SELECT field_to_display FROM table_name "
Set rs=con.execute(sql)
% > 
<select name="myoptions">
<option selected>
 < %
  Do While Not rs.eof
  Response.Write(" <option value= " & rs("field_to_display") & " > " & rs("field_to_display") & "</option>")
  rs.movenext
  Loop
  Set rs=Nothing
 % >
</select>
Best Luck..
Nilesh
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform