I reviewed dbf_memo.pas and noticed some things we should address. These are from my notes from years ago, so they will need refining and validation.
- We should use try/finally to make sure that a page is unlocked if there is an exception after locking a page.
- The handling of blocks could be more robust.
- Appends when it does not need to if ReadSize is not set; ReadSize is only set when using bmReadWrite.
- Appends when it does not need to; Needs to include bytesBefore + bytesAfter in calculation of existing block.
- Ensure that it always creates new block on append record (ReadSize = 0)
- Use of MemoRecordSize is not robust.
- File name is missing from the DBT file header.