I need to import data from some legacy Access databases. I ran the code with some database file, and everything went fine. Now, I tried it with another one and the same code doesn't work.
It seems to be related to character encoding, although I didn't specify anything (and wouldn't know where to do that).
Double age = resultSet.getDouble("âge");
works on first db file, gives an SQLException with "Column not found" on another one. On the problematic database, resultSet.getMetaData().getColumnName(3) (same column) gives "?ge".
UPDATE: it seems that the result is in fact consistent between databases. The difference I saw was because the first import was run from a class in an EJB-project (I ran the main method of some class, not the EJB module in an app server). The second import was done on a new standalone project. The standalone Java project always fails with this exception, but running the same code in the first project always works.
question formulated another way here: https://stackoverflow.com/questions/6519517/getting-ms-access-column-with-international-character-from-java