I am unable to locate in any JDBC specification (http://java.sun.com/products/jdbc/download.html#102spec) the requirement that a ResultSet should be closed when all of the rows retrieved. I also do not see this behavior with MSSQL (2000 or 2005), or with Oracle (9 or 10). Also, this functionality must have been recently fixed or added for Derby 10.3 because I did not see this behavior in Derby 10.2 or 10.1 either.
John -----Original Message----- From: Daniel John Debrunner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 11:24 AM To: Derby Discussion Subject: Re: Invalid XJ215 Error? Peterson, John wrote: > Would you agree that closing the ResultSet when the next() method > returns false is an undesirable side effect which conflicts with the > expected behavior, or have I overlooked something? JDBC 3.0 & early mandated that the result set was closed when all of the rows have been retrieved, that's the behaviour you are seeing. JDBC 4 changed the rules for statement completion (in an incompatible way) and Derby has not reconciled the behaviour yet. The same code supports all the JDBC versions (with additional methods/classes added for newer versions) and traditionally the same behaviour was required across JDBC versions (e.g. JDBC 3 was a super-set of JDBC 2). No one has addressed requiring different behaviour for the same method across different JDBC versions. Changing the behaviour for JDBC 4 will also cause backwards compatibility issues for applications that change to Java 6. Dan.
