When processing an Access_97 file, Column#getLengthInUnits is half of the actual maximum length for TEXT columns. For the attached sample .mdb file
System.out.println(db.getFileFormat());
Table tbl = db.getTable("Table1");
for (Column col : tbl.getColumns()) {
System.out.printf("%s\t%s(Length: %d, LengthInUnits: %d)%n",
col.getName(), col.getType(),
col.getLength(), col.getLengthInUnits());
}
produces
V1997 [VERSION_3]
text50 TEXT(Length: 50, LengthInUnits: 25)
Access_97 does not store TEXT columns as Unicode, so the lengths should be the same (50 in this case).
just curious, what charset are you using for the db?
Default for an Office_97 install on Win2K with "English (United States)" as the locale. Probably Windows-1252, and I just verified that € is stored as 0x80, which seems to confirm that.
I'm curious why you need this to work since 97 is a read only format?
https://stackoverflow.com/a/53970351/2144390
Thank you very much to both, I'm the OP from Stack Overflow. Your hard work inspires me, I will find a way to give back to the community. Thanks!
Unfortunately, i accidentally mislabeled this bug. It did not make the 2.2.1 release. it will be in the 2.2.2 release.
Working like a charm, thank you!