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.
Regards
Lance
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.
>
>Satheesh
>
>Mamta Satoor wrote:
>
>
>
>>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
>>
>>
>>
>>
>>
>>
|