commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell" <>
Subject Re: [commons-dbutils-1.1-dev] QueryRunner#fillStatement - Problem with java.util.Date objects
Date Tue, 18 Apr 2006 16:49:34 GMT
On 4/18/06, Jayant K Das <> wrote:
> Hi,
> I am using the QueryRunner of 1.1-dev which has handled the setNull
> property, but there probably remains a problem, if the param contains a
> java.util.Date object, in that case setObject() won't work directly, rather
> it needs to be changed to java.sql.Date, in this context I have a question
> that whether this conversion should be handled by the QueryRunner or it
> should be the responsibility of the user to fill the appropriate data type
> before calling the method?

It would be nice, but the problem is in what to change it to. You'd
like java.sql.Date; I'd like java.sql.Timestamp and sometimes I'd like
it to be oracle.sql.TIMESTAMP to deal with bugs there. So in the end
dbutils can't get it right.

I wonder how bad it'd be to have it throw an Exception when a
java.util.Date is passed in - fail fast not late. What do you think?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message