
August 9th, 2003, 11:24 AM
|
|
Junior Member
|
|
Join Date: Aug 2003
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
recorset paging
I have to output a recordset using paging. suppose by setteing:
rs.PageSize = 100
The records has two fields: firstID and secondID.
The recordset is ordered by firstID in reverse order, then by secondID in usual alphabetical order:
strSQL = "SELECT firstID,secondID,body FROM Forums "
strSQL = strSQL & " ORDER BY firstID DESC, secondID ASC"
rs.Open strSQL, connStr, adOpenForwardOnly, adLockReadOnly, adCmdTableDirect
The problem is that when I output the current page I DO NOT WANT that the subgroups of records which have the same firstID will be able to be in DIFFERENT pages...
I want that the number of records in every page will be >= 100 , unless the first subgroup of records in the current rs page that have the same firstID field, is larger than 100 : in this case I want that the current rs page will include only this subgroup of records.
Do you have any idea how to do that?
|