db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Blenkush <e...@commongrnd.com>
Subject updateable result set
Date Mon, 31 Jul 2006 09:31:26 GMT
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