Menu

#368 ResultSet positioned update

open
nobody
None
5
2024-09-22
2024-06-01
prrvchr
No

Hi,

I am looking to use positioned ResultSet (ie: java.sql.ResultSet.updateRow()) through LibreOffice Base.
I use a cache that allows me to make an TYPE_SCROLL_INSENSITIVE resultSet TYPE_SCROLL_SENSITIVE.

This works except that if I update the same row of the ResultSet twice, in this case we lose all the rows in the table and only the row updated twice remains.

I have not yet managed to reproduce outside of the jdbcDriverOOo extension.

Discussion

  • prrvchr

    prrvchr - 2024-06-01

    I manage to reproduce with version 2.7.3.
    If I keep all updates in cache and do a single update when closing the ResultSet, then everything works fine.

     
  • Fred Toussi

    Fred Toussi - 2024-06-01

    Is this request for upatable ResultSet created as TYPE_SCROLL_SENSITIVE, where any changed row are reflected in the ResultSet? This is not likely to be developed in the near future.

    I think you have a good solution with the cache.

     
  • prrvchr

    prrvchr - 2024-06-01

    Hi Fred,

    where any changed row is reflected in the ResultSet

    Yes, this allows updates to be displayed even though the underlying ResultSet does not allow this.

    But I have a big problem with the HsqlDB driver, it is that if two updates are made on the same row then we lose the table... I don't have this problem with other drivers (H2, Jaybird, Derby...)

     
  • Fred Toussi

    Fred Toussi - 2024-06-02

    The issue with two updates on the same row is a bug and will be fixed for the next release. It is separate from the feature request for TYPE_SCROLL_SENSITIVE.

    It would be helpful if you provide a code example, but I will investigate the issue even without an example.

     
  • Fred Toussi

    Fred Toussi - 2024-06-22

    The issue with two updates on the same row has been fixed and committed for the next release.

     
  • prrvchr

    prrvchr - 2024-06-23

    Thanks Fred for the fix. It seems to me that I have the same problem with two positionned deletes consecutively executed in a ResultSet.

     
  • Fred Toussi

    Fred Toussi - 2024-06-23

    I committed the fix for the problem. It currently works for in-process connections but I will soon add support for server connections.

     
  • Fred Toussi

    Fred Toussi - 2024-09-22

    It's all been fixed and committed for the 2.7.4 release.

     

Log in to post a comment.

MongoDB Logo MongoDB