Skip to main content
Participating Frequently
September 23, 2011
質問

Display first and last record of the recordset in a Header

  • September 23, 2011
  • 返信数 1.
  • 887 ビュー

Hello,

I'm using ASP and have a simple form where users can select an employee and then enter a date range to view hours that employee worked with more information from our database.

I want display the first date range and ending date range they entered on the search form in a header row that appears right before the repeating recordset.  I either need to display

the parameters that are URL parameters or the first and last record field item for the date.  I'm not sure how to go about this. Any help would be wonderful! 

Crystal

このトピックへの返信は締め切られました。

返信数 1

Participating Frequently
September 23, 2011

select max(mydate), min(mydate) from mytable where.....

Hard to give better advice without more details...table structures, etc.

Crystal_Rouse作成者
Participating Frequently
September 23, 2011

Thanks. This would work in the query but I need to know how to write this to show the MAX Date and MIN Date using ASP from the recordset.

Crystal_Rouse作成者
Participating Frequently
September 26, 2011

You mean you just want to use a single recordset to display the min/max, and also display all of the records in a repeating region? You could produce the recordset sorted by date, navigate to the first record and store in a variable, then navigate to the last record and store in another variable.


Thanks for this suggestion. I figured it out. I was making it harder than it really was.