|
 |
asp_databases thread: Moving through records
Message #1 by "James Texter" <texter@o...> on Tue, 24 Oct 2000 20:02:41 +0100
|
|
I have a page for my website in which I want to fill a form with data from
an Access 2000 database. Now, I have the form created, and I can populate
the fields just fine with the first record. However, I need to be able to
allow the user to move to the next or previous record. What I would
really like to do is to use the next MoveNext and MovePrevious methods of
the recordset and just refresh the form. Is this possible? If so, what
is the easiest way to do it? Thanks in advance for any help.
James
Message #2 by "peter" <ph@t...> on Tue, 24 Oct 2000 23:58:37 +0100
|
|
try creating a function with rs.MoveNext or whatever, that responds to to
an on_click event, generated by a button.
ie
sub moveNext
If Not rs.EOF Then
rs.Movenext
End Sub
& for the button something like
<BUTTON ONCLICK = "MoveNext()" .....</BUTTON>
HTH
peter
Message #3 by Deepak Kapoor <dkapoor@m...> on Wed, 25 Oct 2000 14:07:06 +1000
|
|
Just do a <your recordset>.movenext
and <your recordset>.moveprevious. Make sure that you choose a dynamic
cursor while opening the recordset.
Deepak
-----Original Message-----
From: James Texter [mailto:texter@o...]
Sent: Wednesday, October 25, 2000 5:03 AM
To: ASP Databases
Subject: [asp_databases] Moving through records
I have a page for my website in which I want to fill a form with data from
an Access 2000 database. Now, I have the form created, and I can populate
the fields just fine with the first record. However, I need to be able to
allow the user to move to the next or previous record. What I would
really like to do is to use the next MoveNext and MovePrevious methods of
the recordset and just refresh the form. Is this possible? If so, what
is the easiest way to do it? Thanks in advance for any help.
James
Message #4 by Maxime Bombardier <BombardierM@s...> on Wed, 25 Oct 2000 10:33:10 -0400
|
|
Just wondering, are you doing this client-side inside IE's VBScript with
RDS? This is the only way that you are going to see interaction from a
browser with a recordset.
With ASP+, you could also have onServerClick="MoveNext()" which will reload
the page and you have the new row (assuming you have a way to keep the
recordset, let's say, in Session (not good but possible) and you are showing
that row's information on screen).
Maxime Bombardier, MCSD, MCDBA, MCSE+I
Senior Computer Systems Analyst
Sintaks, a Canon U.S.A. division
xxx.xxx.xxxx (228)
-----Original Message-----
From: peter [mailto:ph@t...]
Sent: Tuesday, October 24, 2000 6:59 PM
To: ASP Databases
Subject: [asp_databases] Re: Moving through records
try creating a function with rs.MoveNext or whatever, that responds to to
an on_click event, generated by a button.
ie
sub moveNext
If Not rs.EOF Then
rs.Movenext
End Sub
& for the button something like
<BUTTON ONCLICK = "MoveNext()" .....</BUTTON>
HTH
peter
Message #5 by "0 0" <solopress_@h...> on Tue, 31 Oct 2000 14:07:07 GMT
|
|
thanks guys i applied my stylesheet to it,my next question is i would like
to know how i retrieve ten records (from a total of 30) per page and list
the number of records found with the facility to navigate to the next page
and back etc(is this paging thru recordsets !!) a
<%
Do While not objRS.EOF
Response.Write "<TR><TD class='tbl'>" & objRS("Description")&"</TD>"
Response.Write "<TD class='tbl'>" & objRS("UK Price")&"</TD>"
Response.Write "<TD class='tbl'>" & objRS("Our Price")&"</TD></TR>"
objRS.Movenext
Message #6 by Yoram Zehavi <YoramZ@i...> on Tue, 31 Oct 2000 16:38:50 +0200
|
|
u have to keep the number in a variant (can be session var)
and use the RS.MoveNext to find your place at the recordset.
-----Original Message-----
From: 0 0 [mailto:solopress_@h...]
Sent: Tuesday, October 31, 2000 4:07 PM
To: ASP Databases
Subject: [asp_databases] Re: Moving through records
thanks guys i applied my stylesheet to it,my next question is i would like
to know how i retrieve ten records (from a total of 30) per page and list
the number of records found with the facility to navigate to the next page
and back etc(is this paging thru recordsets !!) a
<%
Do While not objRS.EOF
Response.Write "<TR><TD class='tbl'>" & objRS("Description")&"</TD>"
Response.Write "<TD class='tbl'>" & objRS("UK Price")&"</TD>"
Response.Write "<TD class='tbl'>" & objRS("Our Price")&"</TD></TR>"
objRS.Movenext
|
|
 |