Hello,

I use the JdbcTemplate for executing SELECTs on my database.
Code:
JdbcTemplate jt = new JdbcTemplate(ds);
List values = jt.queryForList("SELECT accountdate FROM acount");
Map firstRow = (Map) values.get(0);

java.sql.Timestamp accountdate = (java.sql.Timestamp)firstRow.get("accountdate");
The field accountdate is of type TIMESTAMP in the database.
This code above works fine if I specify my MySQL Database as DataSource. But if I switch to my Oracle Database, this code throws a ClassCastException, because the queryForList()/get() returns an Object of type oracle.sql.TIMESTAMP.
Our application should work for more than one Database type. So I choose the Springframework, because I thought it wraps all this database type dependency. But now with this exception above I cannot write common code, but have to use a lot of switches (Oracle or MySQL or SQLServer ...).
I hope there is also a better solution, where the queryForList()/get() returns the common sql type java.sql.Timestamp also in case of Oracle.
Is there a better solution ???

Best Regards,
Mario