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!

Oracle/java timestamp data type error.. please help

585248Jun 27 2007 — edited Jun 28 2007
Im having trouble with a SQL query of mine. Im trying to get a timestamp using JDBC from an oracle database however i get the following error:

java.sql.SQLException: ORA-00932: inconsistent datatypes: expected %s got %s

Now when i put the java.util.timestamp into the DB it appears to change.

When I printout the value of the timestamp in my console it prints the following:

07-06-26 17:28:09.414

When i check the value from SQL PLUS it gives me this value

07-06-26 17:28:09,000000

Does anyone have any idea why this happens? and more importantly how I can retrieve the timestamp again.
Im using BEA workshop which means i dont have any means of manipulating the data before presenting to the frontend.


The database is Oracle 9.2.0.1
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 26 2007
Added on Jun 27 2007
1 comment
1,097 views