db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fernanda Pizzorno <Fernanda.Pizzo...@Sun.COM>
Subject Re: updateable result set
Date Mon, 31 Jul 2006 10:20:25 GMT
Right now scrollable result sets are not updatable in Derby. Scrollable 
insensitive updatable result sets will be available on version 10.2. You 
can try it out by downloading the version 10.2 alpha snapshot at 
http://db.apache.org/derby/derby_downloads.html#Snapshot+Jars.

Fernanda

Eric Blenkush wrote:
> Hi,
>
> Im trying to update a result set that I get from this sql statement:
> select * from QILAN."zip_codes" T0 for update
>
> I create a PreparedStatement like this:
> ps = conn.prepareStatement(sqlStatement,
> ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);       
>
>
> I get the result set then execute this:
> rs.absolute(row);
> rs.updateString(column, newValue);
> rs.updateRow();
>
> I get this error:
> org.apache.derby.client.am.SqlException: ResultSet is not updatable.
>     at org.apache.derby.client.am.ResultSet.checkUpdatePreconditions
> (Unknown Source)
>     at org.apache.derby.client.am.ResultSet.updateString(Unknown Source)
>     at
> org.apache.jsp._005fq_005fsupport.qdbm.edit_005fdata_jsp._jspService
> (org.apache.jsp._005fq_005fsupport.qdbm.edit_005fdata_jsp:130)
>
>
> Looking at the derby docs:
> <http://db.apache.org/derby/papers/JDBCImplementation.html>
>
> I found:
> CONCUR_UPDATABLE concurrency is supported for FORWARD ONLY ResultSet
> types only.
>
> But also found this(via search, not sure what this is referring to
> exactly) which seems to contradict the above:
> <http://db.apache.org/derby/docs/dev/devguide/cdevconcepts28351.html>
> Both scrollable and non-scrollable result sets can be updatable in
> Derby.
>
>
> So are scrollable resultsets updateable or not? If not is this
> planned for the future? Or is the result set not updatable for some
> other reason?
>
> Thanks,
> Eric
>


Mime
View raw message