Jump to content

csarafin

Members
  • Posts

    3
  • Joined

  • Last visited

csarafin's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I like the idea of using data attributes on the option elements. How would I extract all this data on the next page so each attribute would be written to a separate column in a table in a different database? Thanks, csarafin
  2. I'm new to ASP and have a form that lets users choose a division code from a dropdown box that is populated from an access database. Once they have selected the division, I'd like to be able to collect other fields (name, address, city, state, zip) from that same recordset and pass those fields to another asp page. I'm able to write the selected code to the database, but can't figure out how to collect the other fields from that specific line in the table. My code is <%Set objconn = Server.CreateObject("ADODB.Connection")objconn.ConnectionString = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("data/jobdata.mdb")objconn.OpenSet objRs = Server.CreateObject("ADODB.Recordset")strSQL = "SELECT * FROM Locations "objRs.Open strSQL, objconnResponse.Write "<select name=DCode><option value='' selected></option>"Do While Not objRS.EOFResponse.Write "<option value='" & objrs("DCode") &"'>"& objRs("DCity") &"</option>"objRS.MoveNextLoopResponse.Write "</select>"objRs.Closeobjconn.Close%>How do I get the page to also get the DName, DAddress1, DAddress2, DCity, DState, and DZIP fields from the selected DCode so it can be passed to another page for display or writing to a different database.Thanks much, csarafin
×
×
  • Create New...