Skip to content

Error when reading DBF file - header corrupted #22

@sciupinski

Description

@sciupinski

Had a problem when reading the header of DBF file:
FZAPLATY.zip

the fix/workaround in my case was to add condition t_byte == 0 in DotNetDBF.DbField.Read

if (t_byte == DBFFieldType.EndOfField **|| t_byte == 0**)
{
    //System.out.println( "End of header found");
    return false;
}

Otherwise the "empty" fields was read (reading was already consuming the rest of DBF file).

With this additional condition the file is read correctly.

The file was creates with Alaska XBase++ and is a valid DBF file.

The error occured on some of the files I was reading (but not all).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions