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

Error when reading DBF file - header corrupted #22

Open
sciupinski opened this issue Oct 18, 2017 · 1 comment
Open

Error when reading DBF file - header corrupted #22

sciupinski opened this issue Oct 18, 2017 · 1 comment

Comments

@sciupinski
Copy link

sciupinski commented Oct 18, 2017

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).

@andy37380
Copy link

try this.

#34

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

2 participants