Create pages based on the date of the recordset
Create pages based on the date of the recordset
am 08.09.2005 00:52:20 von Mystryman
I am trying to create a page that will show results based on the date.
For example: Sept.1, 2005 returns 105 records Sept. 2, 2005 returns 50
records and sept. 3 returns 75 records, I want each date to be on a
seperate page that I the user can navigate to.
Any ideas,
JG
Re: Create pages based on the date of the recordset
am 08.09.2005 00:56:23 von Mystryman
i should say, page forward/next, back/previous or 1,2,3,4, etc or even
by date would be Ideal.
thank you for any ideas or help
JG
Re: Create pages based on the date of the recordset
am 08.09.2005 03:11:36 von Bullschmidt
Example setting a date range based on posted fields:
strSQL = "SELECT * FROM MyTable WHERE (TheDateField >= #" &
Request.Form("MinDate") & "#) AND (TheDateField <= #" &
Request.Form("MaxDate") & "#)"
Example setting a date range to be the current and previous months:
strSQL = "SELECT * FROM MyTable WHERE (TheDateField >= #" &
DateSerial(Year(Date()), Month(Date()) + 1, 0) & "#) AND (TheDateField
<= #" & DateSerial(Year(Date()), Month(Date()) - 1, 1) & "#)"
Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
<<
I am trying to create a page that will show results based on the date.
For example: Sept.1, 2005 returns 105 records Sept. 2, 2005 returns 50
records and sept. 3 returns 75 records, I want each date to be on a
seperate page that I the user can navigate to.
>>
*** Sent via Developersdex http://www.developersdex.com ***
Re: Create pages based on the date of the recordset
am 08.09.2005 03:13:34 von Bullschmidt
Example of sorting with most recent date first:
strSQL = "SELECT * FROM MyTable ORDER BY MyDateField DESC"
Example of sorting with oldest date first:
strSQL = "SELECT * FROM MyTable ORDER BY MyDateField"
And some paging links:
Database Paging
http://www.asp101.com/samples/db_paging.asp
Uses PageSize method of recordset.
Paging Records with GetRows by Mukul Sabharwal - 7/5/2000
http://www.4guysfromrolla.com/webtech/070500-1.shtml
Uses GetRows.
Displaying a certain # of records on each webpage Paging
http://www.aspfree.com/asp/startpage.asp?id=11
Uses PageSize method of recordset.
Shorter.
Recordset Paging with ADO 2.0 by Michael Qualls
http://www.asp101.com/articles/recordsetpaging/index.asp
Uses PageSize method of recordset.
Longer with more comments.
Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
<<
i should say, page forward/next, back/previous or 1,2,3,4, etc or even
by date would be Ideal.
thank you for any ideas or help
>>
*** Sent via Developersdex http://www.developersdex.com ***