Hi, all (and especially Lance).  I just ran this test:

- Create a statement that is scrollabe and read-only
- Execute a select on the statement
- Attempt to update the row, catch the exception
- Call rs.beforeFirst(). Looking at the embedded code, if the result set is closed, this should cause an exception saying the result set is closed.

My test indicates that the result set is not closed, independent of whether it is holdable or not. But this makes sense. What database would want to close a result set just because someone tries to update it?

That said, I am trying to answer the question to the new metadata call

autoCommitFailureClosesAllResultSets()

where the javadoc states

"Retrieves whether a SQLException while autoCommit is true inidcates that all open ResultSets are closed, even ones that are holdable. When a SQLException occurs while autocommit is true, it is vendor specific whether the JDBC driver responds with a commit operation, a rollback operation, or by doing neither a commit nor a rollback. A potential result of this difference is in whether or not holdable ResultSets are closed."

Based on this javadoc, it looks like our answer should be "false." But is this the correct interpretation? Is there a better way to test this? I feel like I'm not quite understanding the intention of this metadata call.

Thanks,

David
begin:vcard
fn:David W Van Couvering
n:Van Couvering;David W
org:Sun Microsystems, Inc.;Database Technology Group
email;internet:[EMAIL PROTECTED]
title:Senior Staff Software Engineer
tel;work:510-550-6819
tel;cell:510-684-7281
x-mozilla-html:TRUE
version:2.1
end:vcard

Reply via email to