getXXX throws SQLException while on insert row

Поиск
Список
Период
Сортировка
От Prasanth Reddy
Тема getXXX throws SQLException while on insert row
Дата
Msg-id 4726383A.8060909@nqadmin.com
обсуждение исходный текст
Ответы Re: getXXX throws SQLException while on insert row
Список pgsql-jdbc
Hi,

Should the below code throw an SQLException?

rs.moveToInsertRow();
rs.updateInt("account_id", 1023);
rs.getInt("account_id");      - shouldn't this return 1023 rather than throwing SQLException?

Below is the exception:
org.postgresql.util.PSQLException: ResultSet not positioned properly, perhaps you need to call next.
    at org.postgresql.jdbc2.AbstractJdbc2ResultSet.checkResultSet(AbstractJdbc2ResultSet.java:2473)
    at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getString(AbstractJdbc2ResultSet.java:1903)
    at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getFixedString(AbstractJdbc2ResultSet.java:2404)
    at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getInt(AbstractJdbc2ResultSet.java:2012)
    at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getInt(AbstractJdbc2ResultSet.java:2226)



Postgres Server version: 8.1
JDBC Driver version: 8.1-410 JDBC 3

Thanks,
-Prasanth.

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

Предыдущее
От: "cncinfo@126.com"
Дата:
Сообщение: Re: about function overload,a bug?
Следующее
От: Marek Lewczuk
Дата:
Сообщение: Re: AbstractJdbc2Array - another patch