Skip to content

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

@agaddampalli

Description

@agaddampalli

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("a@gmail.com");
            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

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