Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 514759FBD6F for ; Fri, 16 Feb 2007 11:51:22 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 73862-01 for ; Fri, 16 Feb 2007 11:51:09 -0400 (AST) X-Greylist: delayed 01:31:20.777847 by SQLgrey-1.7.4 Received: from smtp3.versatel.nl (smtp3.versatel.nl [62.58.50.90]) by postgresql.org (Postfix) with ESMTP id 08F2C9FBC28 for ; Fri, 16 Feb 2007 11:51:14 -0400 (AST) Received: (qmail 6962 invoked by uid 0); 16 Feb 2007 09:50:43 -0000 Received: from bewww05.admin.zonnet.nl (HELO dell069.admin.zonnet.nl) ([10.170.1.69]) (envelope-sender ) by smtp2.versatel.nl (qmail-ldap-1.03) with SMTP for < >; 16 Feb 2007 09:50:43 -0000 Received: by dell069.admin.zonnet.nl (Postfix, from userid 33) id 1B3322951; Fri, 16 Feb 2007 11:51:03 +0100 (CET) Received: from darla.ti-wmc.nl (darla.ti-wmc.nl [217.114.97.45]) by webmail.versatel.nl (Horde MIME library) with HTTP; Fri, 16 Feb 2007 11:51:03 +0100 Message-ID: <20070216115103.8tagbdi2edy8g8kk@webmail.versatel.nl> Date: Fri, 16 Feb 2007 11:51:03 +0100 From: Alex Stienstra To: pgsql-jdbc@postgresql.org Subject: setArray MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.1.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50 X-Spam-Level: X-Archive-Number: 200702/80 X-Sequence-Number: 16636 Hi, Iam trying to set an array in a prepared statement like this: PreparedStatement stmnt = ds.prepareStatement( "INSERT INTO trainingen (\"Atleet\", \"Datum\", \"Tijdstip\", \"Afstand\", \"Tijd (Zone)\") VALUES (?,?,?,?,?)" ); stmnt.setString(5, "{1,2,3,4,5,6}"); Assuming that the 5th parameter is an array of integer i get the follow error message: ERROR: column "Tijd (Zone)" is of type integer[] but expression is of type character varying I understood from previous discussions that the driver underwater will convert the parameter of setArray into a string representation like i do in the example above. I there any other way of setting an array field in a prepared statement? Alex.