Product Documentation

c-treeDB API for C# - Developers Guide

Previous Topic

Next Topic

Seek to Record

If you know in advance the offset of a given record, CTRecord.SeekRecord() can be used to make it the current record.

You can use CTRecord.GetRecordPos() and CTRecord.SeekRecord() to implement a bookmark system for your records. Retrieve the record offset with CTRecord.GetRecordPos(), which is the bookmark value, and later on you can quickly go back to the record by calling CTRecord.SeekRecord().

// get record bookmark

long GetBookMark(CTRecord &ARecord)

{

return ARecord.GetRecordPos();

}


// goto record bookmark

void GotoBookmark(CTRecord ARecord, long bookmark)

{

ARecord.SeekRecord(bookmark);

}

TOCIndex