db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendle...@amberpoint.com>
Subject Re: updatable selects
Date Tue, 20 Nov 2007 17:49:11 GMT
>             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