Hi,
I've been tracking a bug in my code for the past couple days, and I
think I've finally traced it back to some unexpected behaviour(at least
for me) in hsqldb. I would insert some data including a Timestamp into
a table. After that, I could extract the same data using a SELECT over
a large portion of the columns. However, if I extracted the data and
reconstructed the object that I used to populate the fields, I couldn't
match it with the same SELECT that had previously worked. In the end I
determined that in reconstructing the object, I was using setNanos on
the Timestamp object returned by hsqldb. For some reason unknown to me,
this also updated the timestamp in the actual table. I assumed that
since the ResultSet I got wasn't updateable, any changes I made wouldn't
be reflected in the database. Are my assumptions correct, or am I
missing something?
Also, I'm having a little trouble using sequences. On my initial use of
them, everything is kosher. They increment as I'd expect. When I exit
my app and restart, weird things happen. The sequence still exists as I
get a SQLException saying as much when I try to create it, but the call
for next value returns 0. Is there some way to get the sequence to
store its last value on the disk between invocations?
Thanks,
Charlie Groves
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
|
|