用select (select count(*) from yourtable) - n --知道從n條開始還有多少條. 然後: select top m * from yourtable order by yourfield desc --m是上面算出的數值.
用move移动到你要的记录号,然后next Move This method moves the position of the current record in a recordset.recordset.Move NumRecords, Start Parameters NumRecords Signed Long expression that specifies the number of records that the current record position moves. Start Optional. String or variant that is a book. The default value for this parameter is adBookCurrent. The following table shows the acceptable values. Constant Value Description adBookCurrent 0 Start at the current record. Logically equivalent to passing no value for Start. adBookFirst 1 Start at the first record. adBookLast 2 Start at the last record. Return Values None.
然后用move定位到n条记录。
再开始读取后面的记录。
然後:
select top m * from yourtable order by yourfield desc --m是上面算出的數值.
Move
This method moves the position of the current record in a recordset.recordset.Move NumRecords, Start
Parameters
NumRecords
Signed Long expression that specifies the number of records that the current record position moves.
Start
Optional. String or variant that is a book. The default value for this parameter is adBookCurrent. The following table shows the acceptable values. Constant Value Description
adBookCurrent 0 Start at the current record. Logically equivalent to passing no value for Start.
adBookFirst 1 Start at the first record.
adBookLast 2 Start at the last record.
Return Values
None.