Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table reading does not skip deleted rows, missing property of row deletion #26

Open
b-mi opened this issue Jun 21, 2022 · 0 comments
Open

Comments

@b-mi
Copy link

b-mi commented Jun 21, 2022

This code help for skipping deleted rows. (for foxpro dbf)

        private void ReadRecords(BinaryReader reader, byte[] memoData)
        {
            Records.Clear();

            // Records are terminated by 0x1a char (officially), or EOF (also seen).
            while (reader.PeekChar() != 0x1a && reader.PeekChar() != -1)
            {
                try
                {
                    var isDeleted = reader.PeekChar() == 0x2a; ;
                    var rec = new DbfRecord(reader, header, Fields, memoData, Encoding);
                    if (!isDeleted)
                        Records.Add(rec);
                }
                catch (EndOfStreamException) { }
            }
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant