cancel
Showing results for 
Search instead for 
Did you mean: 

java dictionary

Former Member
0 Kudos

Hello All,

I have created a table using the java dictionary.One of the columns is of type DATE. Our database is oracle. I am using jdbc to access data from the table. When is use the preparestatement setdate to insert data into the date column it does not work . FOr example if i say

con.setDate(1,new java.sql.Date(new java.util.Date().getTime()) it gives me an error saying that invalid object 24-sep-2005 6:21 of type java.sql.Date .

How can i get around this?

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

detlev_beutner
Active Contributor
0 Kudos

Hi Vijay,

I see that you have marked the question as answered - has my answer led to the solution? If yes, please consider rewarding corresponding points. If no, please tell the public where the problem has been and how to solve it, so that others do not only read the question, but also the answer...

Thanks in advance

Detlev

detlev_beutner
Active Contributor
0 Kudos

Hi Vijay,

sounds like you have run into the same buggy OpenSQL inmplementation I have more than one year ago - see

Anyway, after having opened an OSS message, SAP stated it's not a bug In fact, it is. But they won't repair it.

So if it's the same cause, set the time part to zero. Anyway, there exists some helper method in some API to do so, but I don't remember exactly where this has been. If you find out that setting time to 0:0:0:0 helps, call back so that I might also provide you this information.

Hope it helps

Detlev