| From: | Doug Fields <dfields-postgresql(at)pexicom(dot)com> |
|---|---|
| To: | pgsql-jdbc(at)postgresql(dot)org |
| Subject: | Setting array values in JDBC (Driver 7.2) |
| Date: | 2002-02-21 00:04:01 |
| Message-ID: | 5.1.0.14.2.20020220190127.035013a8@mail.pexicom.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
Hello,
As Barry has said, setArray() on a Prepared Statement is currently implemented.
However, there seems to be no way to actually update a Postgresql row with
a native Java array.
Per the JDBC Docs, one should be able to do this with the setObject() call.
This doesn't work in PG JDBC:
DbArrayTest.doInsertTest: SQLException: The table for [I is not in the
database. Contact the DBA, as the database is in an inconsistent state.
(when using an int[] array)
So, you can setArray() but there is no way to create an Array object except
by using the getArray() from retrieving a ResultSet. Well, if you're
creating a record from scratch, you seem to be stuck.
Help?
Thanks,
Doug
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Doug Fields | 2002-02-21 00:12:14 | Empty arrays cause SQLExceptions when using Array.getArray |
| Previous Message | Rene Pijlman | 2002-02-20 23:58:06 | Re: jdbc2 package question |