Currently, ReadRecord accepts an offset indicating what record to read relative to the current record. There is not, however, support for an absolute indexing. This is made more difficult by the fact that the record ID of any given record may not be the same as its position in the file (record ID may have gaps), so there is not a reliable way to compute the relative step to get to a particular index (either record ID value or absolute within the file).
Options:
- If nothing else, it would be nice to be able to explicitly go to the first record in the file. This would satisfy my current use case.
- Implement
ReadRecordInFile(int aRecordIndex), which does something equivalent to first going to the first record and then calling ReadRecord( aRecordIndex)
- Implement
ReadRecordId(int aRecordId) which tracks to a record by its recordID
Currently, ReadRecord accepts an offset indicating what record to read relative to the current record. There is not, however, support for an absolute indexing. This is made more difficult by the fact that the record ID of any given record may not be the same as its position in the file (record ID may have gaps), so there is not a reliable way to compute the relative step to get to a particular index (either record ID value or absolute within the file).
Options:
ReadRecordInFile(int aRecordIndex), which does something equivalent to first going to the first record and then callingReadRecord( aRecordIndex)ReadRecordId(int aRecordId)which tracks to a record by its recordID