Call CTRecord.Prev() to position the current record at the previous record of a table. If the current record is already the first record of a table, CTRecord.Prev() returns false.
// get the previous record of the table
try
{
if (ARecord.Prev())
Console.Write("Previous record found\n");
else
Console.Write("Already at first record\n");
}
catch (CTException err)
{
Console.Write("Prev record failed with error {0}\n", err.GetErrorCode());
}
A current record must exist before CTRecord.Prev() is called, or an ICUR_ERR (100) exception is thrown indicating that there can be no previous record if the current record does not exist. You can establish a current record by calling CTRecord.First(), CTRecord.Last(), CTRecord.Find() or CTRecord.SeekRecord().