Ask a Question related to Dreamweaver AppDev, Design and Development.
-
pat luton #1
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
-
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... -
Retrieving individual data
Hi am trying to retrieve indivual data from a database and i keep getting the following error. Microsoft VBScript compilation (0x800A0401)... -
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... -
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... -
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... -
Drew #2
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



Reply With Quote

