X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 31AA2D1B9A9 for ; Tue, 1 Jun 2004 00:13:07 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 42531-05 for ; Tue, 1 Jun 2004 00:13:05 -0300 (ADT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id CB377D1B896 for ; Tue, 1 Jun 2004 00:13:03 -0300 (ADT) Received: (qmail 22526 invoked from network); 1 Jun 2004 03:13:00 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 1 Jun 2004 03:13:00 -0000 Subject: Re: Arrays and JDBC :: setObject causes array_in Need to From: Dave Cramer Reply-To: pg@fastcrypt.com To: tyagel Cc: "pgsql-jdbc@postgresql.org" In-Reply-To: References: Content-Type: text/plain Organization: Cramer Consulting Message-Id: <1086059579.1592.12.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Mon, 31 May 2004 23:13:00 -0400 Content-Transfer-Encoding: 7bit X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/2 X-Sequence-Number: 10204 I'm not too familiar with arrays, but I think you need to use the setArray method in the preparedStatement interface. Dave On Mon, 2004-05-24 at 09:23, tyagel wrote: > Im repositing this question from Friday as it ended up on the end of a > year old thread that did not answer my question ... > > I have created a database table with and int[] column and I would like > to insert records into this table using JDBC. > > The JDBC documentation that I have read seems to indicate that I > should use setObject when inserting the int[] into my > PreparedStatement. > > When I attempt to insert the record with the int[] that was set via > setObject I get an error reading "array_in: Need to specify > dimension". > > Any help with this would be greatly appreciated. > > Thanks, > Thomas > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faqs/FAQ.html > -- Dave Cramer 519 939 0336 ICQ # 14675561