Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 80150 invoked from network); 19 May 2005 09:48:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 May 2005 09:48:21 -0000 Received: (qmail 28619 invoked by uid 500); 19 May 2005 09:29:16 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 28533 invoked by uid 500); 19 May 2005 09:29:15 -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 28512 invoked by uid 99); 19 May 2005 09:29:15 -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; Thu, 19 May 2005 02:29:13 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 0EED52C5 for ; Thu, 19 May 2005 11:29:00 +0200 (CEST) Message-ID: <1396405883.1116494940059.JavaMail.jira@ajax.apache.org> Date: Thu, 19 May 2005 11:29:00 +0200 (CEST) From: "Bernt M. Johnsen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-276) ResultSet.relative(int row) cannot be called when the cursor is not positioned on a row. In-Reply-To: <1184560572.1115889317270.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-276?page=comments#action_65745 ] Bernt M. Johnsen commented on DERBY-276: ---------------------------------------- The functionality of next,previous,first,last,beforeFirst,afterLast,relative and absolute should be aligned with ch. 14.2.2 in the JDBC 3.0 spec. Another issue found: absolute(0) should behave like beforeFirst() > ResultSet.relative(int row) cannot be called when the cursor is not positioned on a row. > ---------------------------------------------------------------------------------------- > > Key: DERBY-276 > URL: http://issues.apache.org/jira/browse/DERBY-276 > Project: Derby > Type: Bug > Components: JDBC > Reporter: Bernt M. Johnsen > Assignee: Bernt M. Johnsen > Priority: Minor > > If the cursor is not positioned on a row, calling ResultSet.relative() causes the following exception: > Exception in thread "main" ERROR X0X87: ResultSet.relative(int row) cannot be called when the cursor is not positioned on a row. > at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:301) > at org.apache.derby.impl.sql.execute.ScrollInsensitiveResultSet.getRelativeRow(ScrollInsensitiveResultSet.java:336) > at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(EmbedResultSet.java:366) > at org.apache.derby.impl.jdbc.EmbedResultSet.relative(EmbedResultSet.java:1840) > However, The 1.4.2 Javadoc says: > Note: Calling the method relative(1) is identical to calling the method next() and calling the method relative(-1) is identical to calling the method previous(). (This is confirmed by the JDBC 3.0 spec, ch. 14.2.2) > Since next() is valid, so should rs.relative(1) (and all other arguments, since a too large value will position the > cursor after the last row, and a too low value will position it before the first). -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira