jamel / dbf Goto Github PK
View Code? Open in Web Editor NEWJava library for fast reading DBF-files.
License: Apache License 2.0
Java library for fast reading DBF-files.
License: Apache License 2.0
Hey,
I have used this library
i m getting this error
Caused by: org.jamel.dbf.exception.DbfException: Unsupported Dbf field type: 20
Can you help me to resolve this error?
Thanks
I updated the getFieldLength() method in DbfField class with the following to fix.
public int getFieldLength() {
if (dataType == 'C' && decimalCount > 0) {
return fieldLength + (256 * decimalCount);
}
return fieldLength;
}
There are empty values in Date column in file I am trying to parse, your (in other cases very helpful library) is parsing them as some "extreme Date value" with year 17793. Is it possible to update library to parse them as null, which, I think, is expected meaning? File I am parsing can be downloaded from https://liehweb.financnasprava.sk/data/export/cisOLDDBF.zip in this zip it is Subjekt2.dbf file. This code snipet should reproduce it (first expected null value is in first record).
File file = new File("src/test/resources/Subjekt2.dbf");
try (DbfReader reader = new DbfReader(file)) {
Object[] row;
while ((row = reader.nextRecord()) != null) {
Date expectedNullDate = ((Date) row[11]); // <- extreme date parsed here
if(17000 < expectedNullDate.getYear()){ //workaround
expectedNullDate = null;
}
}
}
Don't hurry, my workaround is OK for some time ;-)
Hi,
When I'm reading a dbf with a record marked to be deleted it raises and error.
DbfReader reader = new DbfReader(new File("path_to_some_dbf_file"));
Object[] row;
int count = 1;
while ((row = reader.nextRecord()) != null) {
}
The error appears in reader.nextRecord() ( the line 58 of my class )
Caused by: org.jamel.dbf.exception.DbfException: Failed to parse Number from SHB06
at org.jamel.dbf.DbfReader.readNumericValue(DbfReader.java:137)
at org.jamel.dbf.DbfReader.readFieldValue(DbfReader.java:100)
at org.jamel.dbf.DbfReader.nextRecord(DbfReader.java:81)
at com.openkm.plugin.form.values.OptionSelectProveedoresList.getOptions(OptionSelectProveedoresList.java:58)
... 65 more
Caused by: java.lang.NumberFormatException: For input string: "F 0"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1250)
at java.lang.Double.valueOf(Double.java:504)
at org.jamel.dbf.DbfReader.readNumericValue(DbfReader.java:135)
... 68 more
Would it be possible to use this lib to read DBC (compressed DBF) files?
It is giving issue
Unsupported Dbf field type: 0
Unsupported Dbf field type: 45
Could you please suggest what could be the issue? and is there any way forward.
Return null when i tried to read memo field, is not supported? How can i read it?
Hi,
the read API looks really great ๐ and I would love to use it, but I also need a write API.
Any plans to implement such a functionality?
I would do it myself, if I won't be on a tight schedule
Thanks anyways,
Chris
Hi,
Would be good to have ResultSet-like API for DbfReader with ability to get fields by column names, e.g.
DbfRow row;
while ((row = reader.nextDbfRow()) != null) {
totalSum += row.getDouble("BalanceUSD");
}
The README.md section 'Build from sources' you mentioned
...
./grablew clean build
when it should be
...
./gradlew clean build
The field names is init with system charset, need use default charset of DbfReader
I am getting error unsupported Dbf field type: 32
any fix ??
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.