Loading data from Access field into dropdown list

Results 1 to 3 of 3

Thread: Loading data from Access field into dropdown list

  1. #1
    Lola Guest

    Default Loading data from Access field into dropdown list

    Hi,<BR><BR>I&#039m trying to read data from an Access field (no duplications) so that they<BR>are written to a drop down list box for updates. Any suggestions would be<BR>greatly appreciated. Thank you<BR>

  2. #2
    Ian Stallings Guest

    Default RE: Loading data from Access field into dropdown list

    First you would establish the connection to the DB<BR>using something like this:<BR>&#060;%<BR>Set oConn = Server.CreateObject("ADODB.Connection")<BR> oConn.Open "DSN=yourDsn;UID=username;PWD=password"<BR> sql = "SELECT * FROM DropDownItems"<BR>Set RS = oConn.Execute(sql)<BR>&#037;&#062;<BR><BR><BR>and then you can &#039Loop&#039 through the records<BR>and display them on the screen until there is no more,<BR>rs.EOF (end of field), Like so:<BR><BR>&#060;select NAME="DropDown"><BR>&#060;option SELECTED><BR>&#060;% do until rs.eof &#037;&#062;<BR> &#060;option> &#060;%=rs("DropDownItemDescription")&#037;&#06 2; &#060;/option><BR> &#060;%<BR> rs3.movenext<BR>loop &#037;&#062;<BR>&#060;/select><BR><BR><BR>I hope this helps you. If you have further questions or<BR>don&#039t understand something feel free to ask :)

  3. #3
    Join Date
    Dec 1969
    Posts
    30

    Default RE: Loading data from Access field into dropdown list

    I&#039m trying to do more or less the same, but I want to save the recordset in an Application variable. My drop-down list is a list of countries that I use on all the pages. Now I&#039ve got two issues:<BR>1. Is it (use of Application variable) really going to make my pages faster?<BR>2. Is it poossible that two people trying to access the same variable and scroll through it will have some kind of conflict? Let&#039s say user A accesses first and server is in the middle of creating new page (it scrolls through the Application("countries") variable, and is now on Portugal, now user B asks for the same page but what he gets is a list which begins with Portugal (instead of Aruba). I have experienced this kind of problem on my site and con not find an answer. Please help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •