Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 8D9959FB260 for ; Thu, 27 Sep 2007 13:55:45 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 87010-03-2 for ; Thu, 27 Sep 2007 13:55:37 -0300 (ADT) X-Greylist: delayed 00:28:54.324034 by SQLgrey-1.7.5 Received: from eppesuigoccas.homedns.org (host231-168-dynamic.6-79-r.retail.telecomitalia.it [79.6.168.231]) by postgresql.org (Postfix) with ESMTP id 18EC09FB268 for ; Thu, 27 Sep 2007 13:55:37 -0300 (ADT) Received: from [192.168.2.51] by eppesuigoccas.homedns.org with esmtpsa (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.63) (envelope-from ) id 1IawC2-000680-2Y; Thu, 27 Sep 2007 18:26:28 +0200 Subject: Re: ResultSet with more than 5 rows causes error From: Giuseppe Sacco To: Ludovico Bianchini Cc: pgsql-jdbc@postgresql.org In-Reply-To: <520533.88896.qm@web31903.mail.mud.yahoo.com> References: <520533.88896.qm@web31903.mail.mud.yahoo.com> Content-Type: text/plain Date: Thu, 27 Sep 2007 18:27:07 +0200 Message-Id: <1190910427.18730.35.camel@scarafaggio> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.006 tagged_above=0 required=5 tests=BAYES_50=0.001, RCVD_IN_PBL=0.905, RDNS_DYNAMIC=0.1 X-Spam-Level: * X-Archive-Number: 200709/123 X-Sequence-Number: 17545 Il giorno gio, 27/09/2007 alle 12.20 +0200, Ludovico Bianchini ha scritto: [...] > while(source.next()) { > insertCall.registerOutParameter(1, Types.INTEGER); > for (int i = 1; i <= colCount; i++) { > data = source.getObject(i); > insertCall.setObject(i+1, data); > } > insertCall.execute(); [...] I never used CallableStatement, but I do think you should use insertCall.setObject(i,data) instead of insertCall.setObject(i+1,data)