troubleshooting Question

Connection a Java Application through ODBC to an Unknown Data Source

Avatar of snajalm
snajalm asked on
DatabasesJava
2 Comments1 Solution717 ViewsLast Modified:
Dear Experts,

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.

Please keep in mind that as part of the requirements, everything should go through ODBC connections.

Is there any comprehensive drivers out there that could treat the majority of databases and come up with the right ResultSets in terms of their original types?  

If not, how do you think I should get around this situation where I have no clue what database my application is dealing with at each particular occasion?

Many Thanks,
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros