title: Populate Dropdown from SQL in Classic ASP
body: <p>I am trying to force users to only select certain values when adding a record.  So naturally I am using a dropdown, but I'd like the options to be populated by a specific field in the database.  I figured I'd do a Do/Loop but I am apparently doing something wrong.</p>
  
  <pre><code>Dim dstrSQL
  Dim drs
      dstrSQL = "SELECT EventID FROM Events"
      set conn2 = CreateObject("ADODB.Connection")
      conn2.open CONN_STRING
      set drs = conn2.execute(dstrSQL)
      conn2.close: set conn2 = nothing
  Do
          Response.Write "&lt;option value=" &amp; drs.Fields(0) &amp; " &gt;" &amp; drs.Fields(0) &amp; "&lt;/option&gt;"
          drs.MoveNext
  Loop
  </code></pre>