Hi,
I've been having an issue with my java application which uses java's
RowSet. After transferring my database from PostGres to H2, there has
been a problem with updating my RowSet object. In PostGres I:
inserted a new row into the database using: rowset.insertRow();
then I moved the the DB cursor to the current row using:
rowset.last();

I then called rowset.getRow(); and it always returned the new inserted
row number.

However, after the switch to the H2 database, rowset.last()  would
always return the row number before the the new insertion. For
example, if I inserted a new row 8, call rowset.last(), it would give
me 7 instead of 8. I've also tried rowset.moveToInsertRow() and
moveToCurrentRow(); and got the same result. I used the
rowset.execute() after the the rowset.insertRow() call and it did
update the rowset.last() correctly.
But is there another way without calling rowset.execute()?
Am I doing something wrong with the new H2 database?
Is there some default H2 property that doesn't allow information to be
passed to RowSet immediately after insertion into the H2 database?

These are the properties of the DB I made in H2:
TABLE example(
n_id INT AUTO_INCREMENT,
name VARCHAR(255),
PRIMARY KEY (supplier_id)
).

I would very much appreciate any help I get.

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to