Skip to Content
author's profile photo Former Member
Former Member

java dictionary

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Sep 25, 2005 at 06:31 PM

    Hi Vijay,

    sounds like you have run into the same buggy OpenSQL inmplementation I have more than one year ago - see OpenSQL does not behave right on java.sql.date

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 27, 2005 at 08:09 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.