Setting array values in JDBC (Driver 7.2)

Поиск
Список
Период
Сортировка
От Doug Fields
Тема Setting array values in JDBC (Driver 7.2)
Дата
Msg-id 5.1.0.14.2.20020220190127.035013a8@mail.pexicom.com
обсуждение исходный текст
Список 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


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Doug Fields
Дата:
Сообщение: Empty arrays cause SQLExceptions when using Array.getArray
Следующее
От: "Dave Cramer"
Дата:
Сообщение: Re: Problem with Date and UpdatableResultSet.java??