title: Populate dropdown with data from MS Access
body: <p>I'm trying to populate a dropdown with the data form a MS Access database.</p>
  
  <p>My database of categories consists of a table named <strong>cat</strong> with a field named <strong>Cat</strong>.</p>
  
  <p>I am not very good at either Javascript or VB, but I'm still trying to learn. Having tried different methods for a couple of days without luck I'm asking you guys. 
  I realize there might be some mistakes in the posted code.</p>
  
  <p>So far I have this:</p>
  
  <pre><code>sub getCat
  
      SQL_query = "SELECT * FROM cat ORDER BY Cat"
      Set rsData=conn.Execute(SQL_query)
  
  end sub
  </code></pre>
  
  <p>Dropdown:</p>
  
  <pre><code>&lt;select name="getCat" id="myoptions"&gt;&lt;/select&gt; 
  </code></pre>
  
  <p>Creating options:</p>
  
  <pre><code>var  x = "rsData('Cat'), rsData.MoveNext"
  
  var options = x.split(",");
  
  var select = document.getElementById('myoptions');
  for(var i=0; i&lt;options.length; i++)
    select.options[i] = new Option(options[i], i); 
  </code></pre>