-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Description
Error on read dbf files created with jdbf if there is one (or more) field of Integer type.
String fieldsInfo = "CODE,C,12,0|TITLE,C,40,0|CATEGORY,I,5,0";
DbfMetadata meta1 = DbfMetadataUtils.fromFieldsString(fieldsInfo);
meta1.setType(DbfFileTypeEnum.FoxBASEPlus1);
DbfWriter writer = new DbfWriter(meta1, out); // out is a OutputStream to send the file to the client side.
writer.setStringCharset(Charset.forName("ISO-8859-1")); // ISO-LATIN-1
Map<String, Object> map = new HashMap<>();
map.put("CODE", "1");
map.put("TITLE", "FIRST");
map.put("CATEGORY", 1);
writer.write(map);
writer.close();
No error is raised during creation process.
String fieldsInfo = "CODE,C,12,0|TITLE,C,40,0|CATEGORY,N,5,0";
Changing the definition to N, converts the field to Float, and dbf file can be readed (with an external dbf browser).
Many thanks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels