PDA

View Full Version : Populate a dropdown from database?


elcaro2k
07-09-2003, 01:02 PM
Can someone tell me how to populate a dropdown from an Oracle table?

Thanks,
Ray

raf
07-09-2003, 01:11 PM
Just like from any other db. Only the connectionstring and maybe the executed query need to be different.

But for building the optionlist for the dropdown, it's just like all other db's.


do while rsSoort.EOF=false 'rsSoort = your recordsetname
Response.Write("<option value=" & rsSoort.Fields("nummer")& ">") 'rsSoort.Fields("nummer") = the value for the option. Value for that record in tablevariable "nummer"
Response.Write(server.HTMLEncode(rsSoort.Fields("naam")) & "</option>")
rsSoort.MoveNext
loop


More threads on populating dropdowns:
http://www.codingforums.com/search.php?s=&action=showresults&searchid=140206&sortby=&sortorder=
(fastes results = run a search)

elcaro2k
07-09-2003, 03:25 PM
Thanks!!!

raf
07-09-2003, 03:26 PM
You're welcome.:thumbsup: