dotnetdbf
dotnetdbf copied to clipboard
Unable to read memo fields created by dotnetdbf writer using other dbf readers
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
I don't know? What libraries specifically? We use this to interoperate with clipper and harbour, and they work just fine.
we work with http://xbasej.sourceforge.net/api/org/xBaseJ/DBF.html to read the DBF files