I have written a Java application where it should connect to "any" SQL based data source/database through Microsoft's ODBC connection and run SQL queries. I used the native Sun/Oracle JDBC-ODBC bridge to serve this very purpose. However, I don't seem to be getting the right data type for certain/random fields, depending on which database I get connected to. For instance, I get a "1.0" for a field where I should be getting a plane integer "1" and for date fields I get different timestamps which could be entirely different to what is originally set on the data source's tables.
I also know that the JDBC-ODBC driver provided by Sun/Oracle is an experimental driver and I'm guessing that is the cause of my issue, so I should be looking for a different driver.
Please keep in mind that as part of the requirements, everything should go through ODBC connections.
How would I be able to use Hibernate to get around this issue.
Many Thanks
|