Reading Timestamp values from a ResultSet
Reading Timestamp values from a ResultSet
От:
Whitney Hunter <Whitney.Hunter@watchguard.com>
Дата:
Hi, I am trying to read a Timestamp value from a ResultSet and am getting the following exception: Bad Timestamp Format at 19 in 2001-09-18 14:01:16.26-07 at org.postgresql.jdbc2.ResultSet.getTimestamp(ResultSet.java:447) at com.watchguard.arch.sql.JdbcHelper.getSQLElement(JdbcHelper.java:187) at com.watchguard.arch.dao.RdbDAO.createValueFromResultSet(RdbDAO.java:742) at com.watchguard.arch.dao.RdbDAO.loadOne(RdbDAO.java:141) at com.watchguard.arch.dao.test.RdbDAOTest.testInsert(RdbDAOTest.java:62) at com.watchguard.arch.dao.test.TestMain.main(TestMain.java:12) I am using jdbc7.0-1.2.jar. Is anyone aware of a bug in this version of the driver that would cause this? Unfortunately, I can not get to the postgresql or jdbc driver sites today for some reason, so I can't check for myself. Any help would be appreciated! Thanks, Whitney Hunter
Re: Reading Timestamp values from a ResultSet
От:
Barry Lind <barry@xythos.com>
Дата:
Yes this is a known bug. It is fixed in the 7.1 JDBC driver. The 7.1 driver should work fine against a 7.0 database. thanks, --Barry Whitney Hunter wrote: > Hi, > > I am trying to read a Timestamp value from a ResultSet and am getting the > following exception: > > Bad Timestamp Format at 19 in 2001-09-18 14:01:16.26-07 > at org.postgresql.jdbc2.ResultSet.getTimestamp(ResultSet.java:447) > at > com.watchguard.arch.sql.JdbcHelper.getSQLElement(JdbcHelper.java:187) > at > com.watchguard.arch.dao.RdbDAO.createValueFromResultSet(RdbDAO.java:742) > at com.watchguard.arch.dao.RdbDAO.loadOne(RdbDAO.java:141) > at > com.watchguard.arch.dao.test.RdbDAOTest.testInsert(RdbDAOTest.java:62) > at com.watchguard.arch.dao.test.TestMain.main(TestMain.java:12) > > I am using jdbc7.0-1.2.jar. Is anyone aware of a bug in this version of the > driver that would cause this? Unfortunately, I can not get to the postgresql > or jdbc driver sites today for some reason, so I can't check for myself. > > Any help would be appreciated! > > Thanks, > Whitney Hunter > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > >