Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2009
    Posts
    6

    Question Unanswered: database info- can view in asp but html table??

    hey,
    Ive created a database with several fields. I have uploaded the database and am able to show the information in a asp page. Can anyone help me out with how to get it to show in a html table instead? the code i currently have is:

    <% Dim objConn
    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)};" &_
    "DBQ=" & Server.MapPath("\ssp08\storer\shop.mdb")
    objConn.Open

    Dim objRS
    Set objRS = Server.CreateObject("ADODB.Recordset")
    objRS.Open "shop", objConn, , , adCmdTable
    %>

    <table>
    <tr><td> <% Response.Write objRS("Price")%></td></tr>
    <tr><td><% Response.Write objRS("Description)%></td></tr>
    </table>

    <%
    objRS.close
    Set objRS = Nothing
    objConn.Close
    Set objConn = Nothing
    %>

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    You have to loop through your recordset...

    Have a look at the examples here: ADO Display

    Let us know how you get on
    George
    Home | Blog

  3. #3
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    P.S. please don't post the same question twice! Just so you know, I've deleted your duplicated thread
    George
    Home | Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •