X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3D262537E2 for ; Mon, 18 Apr 2005 09:56:24 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 80257-05 for ; Mon, 18 Apr 2005 12:56:22 +0000 (GMT) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by svr1.postgresql.org (Postfix) with ESMTP id 7C4D6537FE for ; Mon, 18 Apr 2005 09:56:21 -0300 (ADT) Received: from [192.168.1.100] ([24.202.23.128]) by VL-MO-MR007.ip.videotron.ca (iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep 8 2003)) with ESMTP id <0IF5002L97XK10@VL-MO-MR007.ip.videotron.ca> for pgsql-jdbc@postgresql.org; Mon, 18 Apr 2005 08:56:08 -0400 (EDT) Date: Mon, 18 Apr 2005 09:00:03 -0400 From: David Gagnon Subject: ResultSet.relative(0) throws "Cannot move to index of 0" but should not as explain in the Javadoc. In-reply-to: <425F0BE9.60708@fastcrypt.com> To: pgsql-jdbc@postgresql.org Message-id: <4263AF53.7030903@siunik.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) References: <20050415001606.11426.qmail@web40502.mail.yahoo.com> <425F0BE9.60708@fastcrypt.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.014 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/95 X-Sequence-Number: 12702 Hi all, I just ran into what i think is a compliance problem. I can't call ResultSet.relative(0) without getting in exception. As stated in the javadoc it's should just do NOTHING. Am I wrong? Best regards /David rs.relative(skipResults); if (index==0) > throw new SQLException("Cannot move to index of 0"); /** * Moves the cursor a relative number of rows, either positive or negative. * Attempting to move beyond the first/last row in the * result set positions the cursor before/after the * the first/last row. Calling relative(0) is valid, but does * not change the cursor position. * *

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(). * * @param rows an int specifying the number of rows to * move from the current row; a positive number moves the cursor * forward; a negative number moves the cursor backward * @return true if the cursor is on a row; * false otherwise * @exception SQLException if a database access error occurs, * there is no current row, or the result set type is * TYPE_FORWARD_ONLY * @since 1.2 */