db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amit Handa <Amit.Ha...@Sun.COM>
Subject Re: Position of the ResultSet after updateRow?
Date Wed, 05 Jan 2005 09:24:24 GMT
First the Spec does not mandate that
a ResultSet should see it's own updates or inserts.
(but the changes should be reflected to the database irrespective)

Secondly if the DBMS or JDBC drivers
support this(through  DatabaseMetaData.ownXXXAreVisible() ),
it should.

>>My question is about ResultSet position after updateRow. An updateRow
>>can make the row not qualify for the original select query.

It should qualify irrespective of whether it
satisfies the ResultSet query from which it was populated
or not the data should not be allowed to enter the ResultSet.

I agree with Dan it will be part of ResultSet
even though subsequent executions may not fetch that row.

thanks,
Amit

Daniel John Debrunner wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Mamta Satoor wrote:
> 
> 
>>Hi,
>>
>>Some of you might recall the discussion on where the ResultSet should be
>>positioned after deleteRow and the conclusion that it will be placed right
>>before the next row in the ResultSet.
>>
>>My question is about ResultSet position after updateRow. An updateRow
>>can make the row not qualify for the original select query.
> 
> 
> Can anyone from the Sun JDBC team comment on how updateRow() and
> insertRow() are intended to behave when they modify or create rows that
> would not qualify according to the SQL query that created the ResultSet?
> 

> Reading between the lines in the JDBC book seems to imply that the
> updated or inserted row are always part of the ResultSet, even though a
> subsequent execution would not return that row.
> I can see this approach makes sense for going through a list of items in
> an application. Say all items with a price <= 10.0, and modifying the
> price of some to be > 10.0, as a user I might expect to see the newly
> modified row remain in my view, rather than just disappear.
> 
> Dan.
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.5 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFB2uCmIv0S4qsbfuQRAtagAJwOkXd7mu0nLteBa26X4tqGY324RgCdE8ld
> BXWcUymBmC0cK0Yh9dwPE84=
> =YSr2
> -----END PGP SIGNATURE-----
> 






Mime
View raw message