AbsolutePosition Property Example (VC++)

This example positions the current record to the nth record in a dynaset-type Recordset object.

int MoveToRecord(long lPosition, CdbRecordset &rstTest)
{
   rstTest.MoveLast();
   if (rstTest.GetRecordCount() > lPosition)
   {
      rstTest.SetAbsolutePosition(lPosition);
      return TRUE;
   }
   else
      return FALSE;
}