db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik" <dag.wan...@sun.com>
Subject Re: possible bug: "FOR UPDATE" required for updateable result set?
Date Tue, 19 Apr 2005 15:01:06 GMT

Hi,

>>>>> "DJD" == Daniel John Debrunner <djd@debrunners.com> writes:
DJD> 
DJD> Dag H. Wanvik wrote:
DJD> > Hi,
DJD> > 
DJD> > I see the following error message which I suspect to be wrong, I will
DJD> > file a JIRA issue if this is the case, but I would like your opinion first.
DJD> <snip>
DJD> > I need to modify the SELECT statement to include a "FOR UPDATE" clause
DJD> > for the update via cursor to work. 
:
DJD> Technically I wonder if this is covered by the JDBC standard, I see
DJD> nothing in the JDBC 3.0 that states any requirements for the SQL
DJD> statement for an updateable result set. I know the JDBC tutorial book
DJD> has some guidelines as to what will typically work, but isn't it up to
DJD> the database engine to define what works here?

Hmm.. I agree this is not spelled out clearly in the standard, but I 
found this sentence which could be construed as a sufficient
condition for a result set being updatable (section 14.2.4 "Modifying
ResultSet Objects"):

"ResultSet objects with concurrency CONCUR_UPDATABLE can be updated
using ResultSet objects". 

This is too sweeping if taken literally, of course, since not all
result sets can be updated in any case. Still, I would agree with
Mamta that this is an issue, if not a bug, then a usability issue,
especially given the text of the error message ("the ResultSet is not
an updatable ResultSet").

I am new here, so how should I file it? As an improvement?

Thanks,

Dag

DJD> 
DJD> Having said that I think that not requiring the FOR UPDATE would be a
DJD> useful improvement, but I wouldn't categorize it as a bug.
DJD> 
DJD> Dan.
DJD> 
-- 
Dag H. Wanvik
Sun Microsystems, Web Services, Database Technology Group
Haakon VII gt. 7b, N-7485 Trondheim, Norway
Tel: x43496/+47 73842196, Fax:  +47 73842101

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact
the sender by reply email and destroy all copies of the original
message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

Mime
View raw message