db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lance J. Andersen" <Lance.Ander...@Sun.COM>
Subject Re: Question on Read-only resultset and updateXXX and updateRow methods
Date Fri, 14 Jan 2005 21:50:39 GMT
I will discuss this with the JDBC 4 EG.

As you point out this is not clear in the javadocs or the current  JDBC 
3 spec.

We are in the process of trying to clean up some areas in the spec.  
This is another reasonable candidate.


Satheesh Bandaram wrote:

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