Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 72043 invoked from network); 11 Apr 2005 01:57:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Apr 2005 01:57:08 -0000 Received: (qmail 12319 invoked by uid 500); 11 Apr 2005 01:57:05 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 12247 invoked by uid 500); 11 Apr 2005 01:57:05 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 12197 invoked by uid 99); 11 Apr 2005 01:57:04 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from ajax-1.apache.org (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 10 Apr 2005 18:57:01 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 62A9C2E2 for ; Mon, 11 Apr 2005 03:44:19 +0200 (CEST) Message-ID: <121259207.1113183859402.JavaMail.jira@ajax.apache.org> Date: Mon, 11 Apr 2005 03:44:19 +0200 (CEST) From: "Kathey Marsden (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-213) ResultSet.next() after last row of FORWARD_ONLY cursor throws an SQL Exception with Network Server In-Reply-To: <1962366249.1113183857993.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-213?page=comments#action_62525 ] Kathey Marsden commented on DERBY-213: -------------------------------------- This problem appears to be that if the client sends QRYCLSIMP_SERVER_CHOICE or doesn't send any QRYCLSIMP value, the server will default to QRYCLSIMP_YES for fowrard only cursors. I am not sure of the implications of changing it. > ResultSet.next() after last row of FORWARD_ONLY cursor throws an SQL Exception with Network Server > -------------------------------------------------------------------------------------------------- > > Key: DERBY-213 > URL: http://issues.apache.org/jira/browse/DERBY-213 > Project: Derby > Type: Bug > Components: Network Server > Versions: 10.1.0.0 > Reporter: Kathey Marsden > > Network Server closes the result set if ResultSet.next() is > called after the last row of the result set. The test code > below throws the following exception. > SQLState: null > Severity: -99999 > Message: Invalid operation: result set closed > com.ibm.db2.jcc.am.SqlException: Invalid operation: result set > closed > at > com.ibm.db2.jcc.am.ResultSet.checkForClosedResultSet(ResultSet.j > ava:3419) > at > com.ibm.db2.jcc.am.ResultSet.nextX(ResultSet.java:290) > at > com.ibm.db2.jcc.am.ResultSet.next(ResultSet.java:277) > at AfterLast.test(AfterLast.java:75) > at AfterLast.main(AfterLast.java:32) > stmt.executeUpdate("CREATE TABLE TAB ( I INT)"); > stmt.executeUpdate("INSERT INTO TAB VALUES(1)"); > stmt.executeUpdate("INSERT INTO TAB VALUES(2)"); > String sql ="SELECT * from tab"; > ps = conn.prepareStatement(sql); > ResultSet rs = ps.executeQuery(); > System.out.println(sql); > while (rs.next()) > System.out.println(rs.getInt(1)); > try { > System.out.println("one more next"); > rs.next(); > } > catch (Exception e) > { > System.out.println("FAIL: next should return false not throw > exception"); > e.printStackTrace(); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira