I am using SQL Explorer as Eclipse plugin to connect to Teradata 12 via the JDBC driver 13.00.00.07.
I have observed a problem when accessing DATE datatype, e.g.:
select DATE '2009-01-01';
raises the following exception:
java.sql.SQLException: :TeraResultSet:getTimeStamp function failed
In the source code of the sqlexplorer project I have seen that getTimestamp() is used to retrieve the data from the ResultSet for DATE and TIMESTAMP. Apparently the Teradata JDBC driver does not like it.
When I use getDate() for DATE, everything works fine.
The affected class is "net.sourceforge.sqlexplorer.dataset.DataSet", method "loadCellValue".
Here is the code piece (updated for Teradata):
My question is, what is the reason for using getTimestamp() for DATE, respectively is there any disadvantage in using getDate()?
I added your changes to current CVS. I tested it with MySql, Postgres and MsSql and found no problems. As I could see, DATE is returned if only a date value is selected, timestamp if date and time value is returned. Some databases make no differences between date and timestamp.
I don't know Teradata,perhaps it has only separate date and time values and does not support timestamp?
3.5.1 SR1 is released with your change included. Update your installation and check if it is ok.
Thanks for the new relese. It works fine.<br>
Regarding Teradata it supports date, time, and timestamp.
Log in to post a comment.