Subject | Re: setting a Time type PreparedStatement parameter with setString |
---|---|
Author | nagypapi |
Post date | 2006-01-03T09:55:16Z |
> The interbase embedded sql guide does not apply here - we are inJDBC world.
From the java API, java.sql.Time.valueOf:
Parameters:
s - time in format "hh:mm:ss"
This means I cannot set the millisecond value of timestamp via
setString (which in this specific case is NOT a problem)
> As you see from stack trace, we use java.sql.Time.valueOf(...)method. So we
> need to find reason for +-1 hour slip, since it will happen later too.I don't exactly remember the state of my program when that happened,
I'm note even sure of the db structure then, or what kind of setter or
getter method I used. What happened was that everything was working
fine, until from one day, a subset of the computers on the same
network showed different times (+-1 hour) for the same data.
This was probably related to some kind of timezone mismatch in the
JRE, something I wouldn't want to run into again, that's why I'm
always setting and getting Strings when it comes to time :)
John