db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Steen Jakobsen" <...@logodata.dk>
Subject RE: updatable selects
Date Wed, 21 Nov 2007 07:24:45 GMT
Except the fact that my editor seems to insist of putting in
type_scroll_sencitive (!) 
Instead of type_scroll_insencitive . ( It took a couple of tries to get
it to accept that one.)
 
But the result is the exact same: the resultset is not updatable. 

I've investigated the "possibility" with sql-server-express, and it do
not like scroll insencitive at all. Wants holdability"!

And that maybe points to a weakness in my idea ... The connection could
time out. 
Making this futile anyhow.

But I did like the idea 
   Db -> resultset -> presentation layer model 
   Db <- resultset  <- presentation layer model 

One love , one life .-) 

Well it ain't a perfect world ... and jave/javadb/sql etc seems all in
all to promise a lot more versatility than the stuff that I have been
working with for the last 10 years.

And boy am I greatefull for the response I'm getting ...  I'll be back! 


-----Original Message-----
From: Bryan Pendleton [mailto:bpendleton@amberpoint.com] 
Sent: 20. november 2007 19:01
To: Derby Discussion
Subject: Re: updatable selects

>             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