Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

datetime field overflow error

843859Dec 20 2006 — edited Dec 22 2006
Hi all,
I'm getting this error, supposedly from Oracle, but I wanted to verify it wasn't the way my Java Server Page was constructed.

The intial part of my SQL statement -
 
String prepSQL = "SELECT CHANGE_CTRL_ID, a.BUSVP, a.BRANCH, VOTE, to_char(VOTE_TIMESTAMP, 'YYYY-MM-DD HH24:MI:SS'), VCOMMENTS, ROLE_NAME  FROM VOTETBL " +
 
in it, I'm trying to pull back my VOTE_TIMESTAMP field as one of DATE w/ the to_char formatting. Is this part not done properly? I've perused this forum some and found things on buffer overflow, but it didn't look to be the same error to me.

My console shows:
java.sql.SQLException: [Oracle][ODBC]Datetime field overflow.      
 at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6106)
Any way, if I alter the date format session in SQL Plus, I can see all the times of people's votes. I don't think I need to use the SimpleDateFormat object in Java to get this, but I could be wrong about that.

If anyone sees anything done incorrectly here that's affecting this overflow, please respond!

Thanks!

Message was edited by:
bpropes20

Message was edited by:
bpropes20
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 19 2007
Added on Dec 20 2006
5 comments
1,622 views