db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michelle Caisse <Michelle.Cai...@Sun.COM>
Subject Re: updatable selects
Date Tue, 20 Nov 2007 18:27:11 GMT
Maybe the problem is visibility of the updates. You can't use an 
updatable scrollable ResultSet in the way Erik wanted because the 
updates are not always visible in the ResultSet to be displayed to the 
user. It would be nice to have everything visible in the ResultSet.

-- Michelle

Bryan Pendleton wrote:

>>             Statement stmt =
>> conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
>>                         ResultSet.CONCUR_UPDATABLE,
>>                         ResultSet.CLOSE_CURSORS_AT_COMMIT);
>>
>> // this will NOT WORK ... ONLY ResultSet.TYPE_FORWARD_ONLY
>> // Updatable statements have some requirements
>> // for example, select must be on a single table
>>
>>             ResultSet uprs = stmt.executeQuery(
>>                         "SELECT * " +
>>                         "FROM \"tab1\" FOR UPDATE of \"account\""); //
>
>
> I don't understand why this doesn't work. It seems to me that
> your select statement only references a single table. I don't
> see any violation of the rules listed at
> http://db.apache.org/derby/docs/dev/ref/rrefsqlj41360.html#rrefsqlj41360
>
> This seems like a bug to me; I think you should have got an
> updatable ResultSet.
>
> thanks,
>
> bryan
>


Mime
View raw message