Skip to content

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

Open
@b-mi

Description

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) { }
            }
        }

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions