Difference between TYPE_SCROLL_INSENSITIVE and TYPE_SCROLL_SENSITIVE ResultSets
From: Jonck van der Kogel <jonck_at_vanderkogel.net>
Date: 5 Feb 2004 16:36:46 -0800
Message-ID: <28a69e7c.0402051636.63d850bc_at_posting.google.com>
Hi everybody,
While working with the JDBC API (with MySQL as the DB being queried) I recently bumped into the terms TYPE_SCROLL_INSENSITIVE and TYPE_SCROLL_SENSITIVE ResultSets. The scrolling part is clear, you are allowed to move through the ResultSet in a dynamic fashion. The sensitive or insensitive part was not so clear to me however. What I read was that "... the ResultSet can change as a result of modifications to the database by others.". Does this mean that if:
- user A queries row 1 in a table
Date: 5 Feb 2004 16:36:46 -0800
Message-ID: <28a69e7c.0402051636.63d850bc_at_posting.google.com>
Hi everybody,
While working with the JDBC API (with MySQL as the DB being queried) I recently bumped into the terms TYPE_SCROLL_INSENSITIVE and TYPE_SCROLL_SENSITIVE ResultSets. The scrolling part is clear, you are allowed to move through the ResultSet in a dynamic fashion. The sensitive or insensitive part was not so clear to me however. What I read was that "... the ResultSet can change as a result of modifications to the database by others.". Does this mean that if:
- user A queries row 1 in a table
- while user A still has the ResultSet open user B comes along and makes a change in this same row 1, user A's ResultSet will change "live"??
I tried experimenting with this a bit, but saw no such behavior. Therefore I am assuming that the difference between sensitive and insensitive ResultSets is something different.
Could someone here explain to me what the difference is between the two and in which situations one is preferable over the other? Thanks very much, Jonck Received on Fri Feb 06 2004 - 01:36:46 CET