Re: updateString error in PostgreSQL7.4 with JDBC

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: updateString error in PostgreSQL7.4 with JDBC
Дата
Msg-id Pine.BSO.4.56.0411102322130.32418@leary.csoft.net
обсуждение исходный текст
Ответ на updateString error in PostgreSQL7.4 with JDBC  (Suha Onay <suha@liqia.com>)
Список pgsql-general

On Wed, 10 Nov 2004, Suha Onay wrote:

>         st = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
> ResultSet.CONCUR_UPDATABLE);
>         rs = st.executeQuery("select * ...";
>
> Then:
>     rs.updateString(20 , ...);
>
> The error is:
> org.postgresql.util.PSQLException: Cannot update the result set because
> it is either before the start or after the end of the results.


You must be on a row (or the insert row) to update it, you have not shown
any positioning methods (like next()) being called on the ResultSet so it
is left positioned before the first row.  I don't know what the 7.3 driver
was actually doing, but this error is the expected behavior of the driver,
unless of course you are doing something else you haven't shown us.

Kris Jurka

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

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: Postgresql future changes
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Proposal: GRANT cascade to implicit sequences