db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satheesh Bandaram <sathe...@Sourcery.Org>
Subject Re: Question on Read-only resultset and updateXXX and updateRow methods
Date Fri, 14 Jan 2005 21:40:24 GMT
I think throwing error in the updateInt() method early is good. Why wait
till updateRow()?

Also the JCC driver (Derby's current client JDBC driver) throws error
for the updateInt(), so both embedded driver and the network driver
would behave the same.


Mamta Satoor wrote:

>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
>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.

View raw message