Ask a Question related to ASP Database, Design and Development.
-
risa #1
Record paging through question
I have a problem with the paging function. The rs.pagecount seems only
refer
to the total number of records, not the selected ones. So it works
well on
the first page, while it goes back to the original number of records
starting
from the second page. For example, I have a table with a total of 1000
records,
that is the number of myrs.recordcount and the number of pagecount
(with fixed pagesize), when I select 400 from the 1000 records with
the SQL select
statement, the pagecount and recordcount work well on the first page
display but it goes back to the original 1000 records from the second
page. Is there something that can be used to remember my selected
records so it doesn't
go back to the original ones? Thanks so much for your help.
risa Guest
-
Efficient record paging in CFMX MSSQL
When we moved from CF5 to CFMX, we saw the read speeds on our MS SQL2000 database increase by 1500%. A simple read coded as shown below, ran in... -
Paging question
Hi all and thanks in advance for your help, I am reading this book called ASP.NET unleashed and on the datagrid section it says that there is a... -
Single Record Paging in a Query
Once on a single record's detail page, I use it's CategoryID to create a second query, which is a list of records in the same category. I would like... -
Single row of data displayed horizontally next to label names with paging per record... possible?
My employer really likes DataGrids for displaying some of our data for dashboards and such, but would like to be able to browse one of our... -
Custom Paging Question
Greetings, I have a problem that I am trying to work through. Any help would be appreciated. I have an asp.net application that uses... -
Aaron Bertrand - MVP #2
Re: Record paging through question
> Another thing I see reading through this, is you should select ALL the
So if there are 18,000,000 rows, risa should select ALL the rows?> records and not top 400 or something like that.
Aaron Bertrand - MVP Guest
-
Michael C. Gates #3
Re: Record paging through question
What I meant was, the query shouldn't reflect the number of records. Maybe I
am wrong, but this is how I do it:
<%
sql = "select * from TABLE"
set r = Server.CreateObject("ADODB.RecordSet")
r.pagesize = 6
r.open sql, conn, 3
if r.eof then
response.write "NO RECORDS"
else
r.absolutePage = currpage
recs = r.recordCount
for x = 1 to r.Pagesize
'DISPLAY STUFF
if r.eof then exit for
r.moveNext
next
end if
%>
Regards,
McG
"Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message
news:%23zDlpWJbDHA.1748@TK2MSFTNGP12.phx.gbl...>> > Another thing I see reading through this, is you should select ALL the
> > records and not top 400 or something like that.
> So if there are 18,000,000 rows, risa should select ALL the rows?
>
>
Michael C. Gates Guest
-
risa #4
Re: Record paging through question
Thanks for the reply. That is my question as well. What I want is to
be able to page the selected ones, not ALL. I did use the
querystring("page") but it seems to work only on the first query
result page. My code has 180 lines, is it too long to post it here?
Please help!
risa Guest
-
Aaron Bertrand - MVP #5
Re: Record paging through question
180 lines?
You might try to work through a couple of these examples, instead of
re-inventing the wheel.
[url]http://www.aspfaq.com/2120[/url]
The biggest one is 91 lines, including delimiters and plenty of comments.
You could make it even more efficient by using getRows() instead of looping
through a recordset. Also, you didn't mention which database you are using,
but if it's SQL Server, you can perform a lot of the filtering at the
database end, reducing network chatter...
"risa" <risa_wu@ci.cerritos.ca.us> wrote in message
news:9019be51.0308270928.773883e7@posting.google.c om...> Thanks for the reply. That is my question as well. What I want is to
> be able to page the selected ones, not ALL. I did use the
> querystring("page") but it seems to work only on the first query
> result page. My code has 180 lines, is it too long to post it here?
> Please help!
Aaron Bertrand - MVP Guest
-
risa #6
Re: Record paging through question
Thank you very much for your help, Michael and Aaron: I am going to
give it a try again today. Michael, what is your email address? I
cannot seem to get it.
Risa
risa Guest



Reply With Quote

