You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, sorry, maybe I am missing something obvious, but I can't write null values into numeric fields, all null values become zeroes in the end file. I create Object[] rowObjects = new Object[field.Count]; (which is not documented in a quick start some how)
Fill it like this
rowObjects[i] = ((field_value==DBNull.Value) ? null : field_value);
Or like this
rowObjects[i] = field_value;
Then
writer.AddRecord(rowObjects);
Then
writer.Write(fos);
In both cases I get zeroes, please help.
The text was updated successfully, but these errors were encountered:
Plavozont
changed the title
Can't write empty value into numeric fields
Can't write empty values into numeric fields
May 17, 2022
... DBFs only have the concept of an "empty" value, which is usually a common value that fields normally contain. For example, 0 is the "empty" value for a DBF table, but 0 is often a legitimate value a numeric field can contain and is thus not suitable to be treated as a true NULL value.
Hello, sorry, maybe I am missing something obvious, but I can't write null values into numeric fields, all null values become zeroes in the end file. I create Object[] rowObjects = new Object[field.Count]; (which is not documented in a quick start some how)
Fill it like this
rowObjects[i] = ((field_value==DBNull.Value) ? null : field_value);
Or like this
rowObjects[i] = field_value;
Then
writer.AddRecord(rowObjects);
Then
writer.Write(fos);
In both cases I get zeroes, please help.
The text was updated successfully, but these errors were encountered: