retrieving individual record

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default retrieving individual record

    Hi am trying to retrieve individual record does anyone have a clue how to go
    about it.The code below retrieves all records in the statement table but i need
    it to just retrieving record for the person logged on.
    <%
    '--connect to statement.mdb database--
    Set conn1= Server.CreateObject("ADODB.Connection")
    conn1.open "Provider = Microsoft.Jet.OLEDB.4.0; Data Source=
    '--get statement recordset--
    set rs1 = Server.CreateObject ("ADODB.Recordset")
    rs1.open "select * from statement ", conn1
    '--rs1.Open "strSql", conn---
    '--show the customers in HTML table--
    '--create the table headings---
    x = "<table border = 1><tr><th>CustID<th>Account Number<th>Starting
    Balance<th>Withdrawal<th>Transfer<th>Balance</tr>"
    response.write x
    '--list each customer---
    rs1.movefirst
    while not rs1.eof
    x = "<tr><td>" & rs1("CustID") & "<td>" & rs1("Account Number") & "<td>" &
    rs1("Starting Balance") & "<td>" & rs1("Withdrawal") & "<td>" & rs1("Transfer")
    & "<td>" & rs1("Balance") & "</tr>"
    response.write x
    rs1.movenext
    wend
    response.write "</table>"
    '--close the database--
    rs1.close
    conn1.close
    set rs1 = nothing

    %>
    Please some help me

    pat luton Guest

  2. Similar Questions and Discussions

    1. retrieving last record inserted using @@IDENTITY - ASPJScript
      Im triyng to retrieve the last record inserted usnig the "Insert" Server Behavior, in a table that have an auto-incrementig id column. Im trying...
    2. Retrieving individual data
      Hi am trying to retrieve indivual data from a database and i keep getting the following error. Microsoft VBScript compilation (0x800A0401)...
    3. Retrieving a field from the NEW record
      Hi all, I'm tearing my hair out trying to solve the following problem. I want to be able to retrieve the value of the primary key in a trigger...
    4. Individual Text
      OK...the other day I posted a message because I couldn't identify a font. Well, I figured it out, it turned out to be what I thought it was...Agfa...
    5. Database record retrieving
      > They have links to actually, they do, but they just use a more complex layout, among other things. for instance, the center column would be...
  3. #2

    Default Re: retrieving individual record

    You need to modify your query,

    select * from statement

    to something like this,

    select * from statement where userid = 'user'

    HTH,
    drew


    "pat luton" <webforumsuser@macromedia.com> wrote in message
    news:d35vlj$qlg$1@forums.macromedia.com...
    > Hi am trying to retrieve individual record does anyone have a clue how to
    > go
    > about it.The code below retrieves all records in the statement table but i
    > need
    > it to just retrieving record for the person logged on.
    > <%
    > '--connect to statement.mdb database--
    > Set conn1= Server.CreateObject("ADODB.Connection")
    > conn1.open "Provider = Microsoft.Jet.OLEDB.4.0; Data Source=
    > '--get statement recordset--
    > set rs1 = Server.CreateObject ("ADODB.Recordset")
    > rs1.open "select * from statement ", conn1
    > '--rs1.Open "strSql", conn---
    > '--show the customers in HTML table--
    > '--create the table headings---
    > x = "<table border = 1><tr><th>CustID<th>Account Number<th>Starting
    > Balance<th>Withdrawal<th>Transfer<th>Balance</tr>"
    > response.write x
    > '--list each customer---
    > rs1.movefirst
    > while not rs1.eof
    > x = "<tr><td>" & rs1("CustID") & "<td>" & rs1("Account Number") & "<td>"
    > &
    > rs1("Starting Balance") & "<td>" & rs1("Withdrawal") & "<td>" &
    > rs1("Transfer")
    > & "<td>" & rs1("Balance") & "</tr>"
    > response.write x
    > rs1.movenext
    > wend
    > response.write "</table>"
    > '--close the database--
    > rs1.close
    > conn1.close
    > set rs1 = nothing
    >
    > %>
    > Please some help me
    >

    Drew Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139