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

Unable to read memo fields created by dotnetdbf writer using other dbf readers #13

Open
agaddampalli opened this issue Oct 31, 2016 · 2 comments

Comments

@agaddampalli
Copy link

I have certain files which has memo fields and dotnetdbf writer created the dbt files for those.

        using (Stream fos = File.Open(@"E:\temp\estima.dbf", FileMode.OpenOrCreate, FileAccess.ReadWrite))
        {
            var writer = new DBFWriter();
            writer.DataMemoLoc = @"E:\temp\estima.dbt";
            MemoValue emailVal = new MemoValue("[email protected]");
            var id = new DBFField("Id", NativeDbType.Numeric, 15, 0);
            var name = new DBFField("name", NativeDbType.Char, 30, 0);
            var address = new DBFField("address", NativeDbType.Date);
            var email = new DBFField("email", NativeDbType.Memo);

            var dbFields = new List<DBFField> { id, name, address, email };
            writer.Fields = dbFields.ToArray();
            List<object> values = new List<object> { 1, "Jhon", DateTime.Now, emailVal };
            writer.AddRecord(values.ToArray());

            writer.Write(fos);
        }

I tried to read these files using java xbase DBF reader to read the generated dbf file, it was unable to read the memo fields and throwing a null pointer exception.

I tried with other reader which had the same issue of reading the memo fields from dbt file.

Could you please help me getting through this issue

@jbtule
Copy link
Member

jbtule commented Oct 31, 2016

I don't know? What libraries specifically? We use this to interoperate with clipper and harbour, and they work just fine.

@agaddampalli
Copy link
Author

we work with http://xbasej.sourceforge.net/api/org/xBaseJ/DBF.html to read the DBF files

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