Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. how to add to fields from a access database to a list box using asp code

how to add to fields from a access database to a list box using asp code

Scheduled Pinned Locked Moved Web Development
databasesysadminhelptutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bobolov
    wrote on last edited by
    #1

    this is my code...and i want the code to display two fields together concatenate them in the list box that is the code and description...when i run it with in the browser displays a Error Type: Microsoft VBScript compilation (0x800A03EE) Expected ')' line 64, column 47 <% Set oRs=Server.CreateObject("adodb.recordset") strSQL = "SELECT code ,description FROM projects" oRs.Open strSQL, conn Do while not oRs.EOF if Request.Form("code") = oRs("Code") then Response.Write ("& ("description") ") oRs.MoveNext else Response.Write ("& ("description") ") oRs.MoveNext end if loop %> bobo

    P 1 Reply Last reply
    0
    • B bobolov

      this is my code...and i want the code to display two fields together concatenate them in the list box that is the code and description...when i run it with in the browser displays a Error Type: Microsoft VBScript compilation (0x800A03EE) Expected ')' line 64, column 47 <% Set oRs=Server.CreateObject("adodb.recordset") strSQL = "SELECT code ,description FROM projects" oRs.Open strSQL, conn Do while not oRs.EOF if Request.Form("code") = oRs("Code") then Response.Write ("& ("description") ") oRs.MoveNext else Response.Write ("& ("description") ") oRs.MoveNext end if loop %> bobo

      P Offline
      P Offline
      Paddy Boyd
      wrote on last edited by
      #2

      Should this not be:

      bobolov wrote:

      Response.Write ("& ("description") ")

      Response.Write ("" & oRs.Fields("description") & " "

      B 1 Reply Last reply
      0
      • P Paddy Boyd

        Should this not be:

        bobolov wrote:

        Response.Write ("& ("description") ")

        Response.Write ("" & oRs.Fields("description") & " "

        B Offline
        B Offline
        bobolov
        wrote on last edited by
        #3

        is there any other way doing this...i need two feilds in the listbox option...thanks for all the help...im new to this :)... Error Type: Microsoft VBScript compilation (0x800A03EE) Expected ')'

        <% Set oRs=Server.CreateObject("adodb.recordset") strSQL = "SELECT code ,description FROM projects" oRs.Open strSQL, conn Do while not oRs.EOF if Request.Form("code") = oRs("Code") then Response.Write ("" & oRs.Fields("description") & " " oRs.MoveNext else Response.Write ("" & oRs.Fields("description") & " " oRs.MoveNext end if loop %> bobo... -- modified at 2:22 Tuesday 13th June, 2006

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups