Re: Arrays and JDBC :: setObject causes array_in Need to

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: tyagel <tyagel(at)yahoo(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Arrays and JDBC :: setObject causes array_in Need to
Date: 2004-06-01 03:13:00
Message-ID: 1086059579.1592.12.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Sharib Anis 2004-06-01 06:24:38 Re: Postgresql 7.4.2 and OutOfMemoryError
Previous Message Dave Cramer 2004-06-01 03:07:47 Re: Question about connections