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. a beginner unable to retrieve data from database

a beginner unable to retrieve data from database

Scheduled Pinned Locked Moved Web Development
helpdatabasesysadminlearning
4 Posts 4 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.
  • J Offline
    J Offline
    joypreeti
    wrote on last edited by
    #1

    hello friends, i m fairly new to ASP. i installed PWS thur windows 98 cd on windows 98 OS. now i m tyring this code <% set cn=server.createobject("adodb.connection") cn.open "c:\inetpub\wwwroot\myprog\vbquiz.mdb" set rs=cn.execute "select * from quiz" rs.movefirst do while not rs.eof Response.write rs("quizid") rs.movenext loop %> but nothing is displayed. my PWS is on. but while i installed PWS thr was one error MTS not installed properly. is the problem related to MTS or m i wrong somewhr. please do help me. i ma beginner.

    H R L 3 Replies Last reply
    0
    • J joypreeti

      hello friends, i m fairly new to ASP. i installed PWS thur windows 98 cd on windows 98 OS. now i m tyring this code <% set cn=server.createobject("adodb.connection") cn.open "c:\inetpub\wwwroot\myprog\vbquiz.mdb" set rs=cn.execute "select * from quiz" rs.movefirst do while not rs.eof Response.write rs("quizid") rs.movenext loop %> but nothing is displayed. my PWS is on. but while i installed PWS thr was one error MTS not installed properly. is the problem related to MTS or m i wrong somewhr. please do help me. i ma beginner.

      H Offline
      H Offline
      hxxbin
      wrote on last edited by
      #2

      The problem is that you need a ADO Recordset, before to set rs to cn.Execute you must create the objet, like this set rs = server.createobject("adodb.recordset") ---- hxxbin

      1 Reply Last reply
      0
      • J joypreeti

        hello friends, i m fairly new to ASP. i installed PWS thur windows 98 cd on windows 98 OS. now i m tyring this code <% set cn=server.createobject("adodb.connection") cn.open "c:\inetpub\wwwroot\myprog\vbquiz.mdb" set rs=cn.execute "select * from quiz" rs.movefirst do while not rs.eof Response.write rs("quizid") rs.movenext loop %> but nothing is displayed. my PWS is on. but while i installed PWS thr was one error MTS not installed properly. is the problem related to MTS or m i wrong somewhr. please do help me. i ma beginner.

        R Offline
        R Offline
        Roger Wright
        wrote on last edited by
        #3

        Your connection string isn't sufficient - try this: strConnect= "Provider=Microsoft.Jet.4.0;Data Source=c:\inetpub\wwwroot\myprog\vbquiz.mdb" strCmd="SELECT * FROM quiz" Set cn=server.createobject("adodb.connection") Set rs=Server.CreateObject("ADODB.Recordset") cn.Open strConnect Set rs=cn.Execute strCmd While Not rs.EOF Response.Write rs("quizid") & "
        " rs.MoveNext Wend Heard in Bullhead City - "You haven't lost your girl -
        you've just lost your turn..." [sigh] So true...

        1 Reply Last reply
        0
        • J joypreeti

          hello friends, i m fairly new to ASP. i installed PWS thur windows 98 cd on windows 98 OS. now i m tyring this code <% set cn=server.createobject("adodb.connection") cn.open "c:\inetpub\wwwroot\myprog\vbquiz.mdb" set rs=cn.execute "select * from quiz" rs.movefirst do while not rs.eof Response.write rs("quizid") rs.movenext loop %> but nothing is displayed. my PWS is on. but while i installed PWS thr was one error MTS not installed properly. is the problem related to MTS or m i wrong somewhr. please do help me. i ma beginner.

          L Offline
          L Offline
          lanying_wzw
          wrote on last edited by
          #4

          <% Set cn = server.createobject("adodb.connection") Set rs = Server.CreateObject("ADODB.RecordSet") cn.open "Provider=Microsoft.Jet.4.0;Data Source= c:\inetpub\wwwroot\myprog\vbquiz.mdb" set rs = cn.execute("select * from quiz") rs.movefirst do while not rs.eof Response.write rs("quizid") rs.movenext loop %> good luck

          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