pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedArrays and JDBC :: setObject causes array_in Need to specify dimension
2+ messages / 2 participants
[nested] [flat]
* Arrays and JDBC :: setObject causes array_in Need to specify dimension
@ 2004-05-24 13:23 tyagel <tyagel@yahoo.com>
0 siblings, 1 reply; 2+ messages in thread
From: tyagel@yahoo.com @ 2004-05-24 13:23 UTC (permalink / raw)
To: pgsql-jdbc
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
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Arrays and JDBC :: setObject causes array_in Need to
@ 2004-06-01 03:13 Dave Cramer <pg@fastcrypt.com>
parent: tyagel <tyagel@yahoo.com>
0 siblings, 0 replies; 2+ messages in thread
From: Dave Cramer @ 2004-06-01 03:13 UTC (permalink / raw)
To: tyagel <tyagel@yahoo.com>; +Cc: 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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-06-01 03:13 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-05-24 13:23 Arrays and JDBC :: setObject causes array_in Need to specify dimension tyagel <tyagel@yahoo.com>
2004-06-01 03:13 ` Re: Arrays and JDBC :: setObject causes array_in Need to Dave Cramer <pg@fastcrypt.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox