db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mamta Satoor <ma...@Remulak.Net>
Subject Question on Read-only resultset and updateXXX and updateRow methods
Date Fri, 14 Jan 2005 21:11:20 GMT
Hi,

Unless I have missed it in the JDBC spec or apis, I don't think JDBC documentation
says when a driver should throw an exception for update attempt on a read-only
ResultSet.

In following eg, should the driver throw exception that update api not permitted on read-only
resultsets at rs.updateInt time or at rs.updateRow time?
   stmt = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
   rs = stmt.executeQuery("SELECT c1,c2 FROM t1");
   rs.updateInt(1,222);
   rs.updateRow();

It seems like the right thing to do would be to throw an exception on updateInt method,
but I would like to know community's thoughts on this.

thanks,
Mamta


Mime
View raw message