//do something here ... ... pRstEmployees->MoveNext(); if(pRstEmployees->EndOfFile) break; } }
Actually as smallerkk(smallerkk) said, paging perhaps the best method of all, u can open the recordset with descending or ascending sort,then specify the pagesize u like
10个读一次!
//Display Names and hire dates, five records at a time
pRstEmployees->PageSize = 5; int intPageCount = pRstEmployees->PageCount;
for(int intPage=1;intPage<=intPageCount;intPage++)
{
pRstEmployees->put_AbsolutePage((enum PositionEnum)intPage);
strMessage = ""; for(int intRecord=1;
intRecord<=pRstEmployees->PageSize;intRecord++)
{
//do something here ...
... pRstEmployees->MoveNext(); if(pRstEmployees->EndOfFile)
break;
}
}
u can open the recordset with descending or ascending sort,then specify the pagesize u like