Re: updateString error in PostgreSQL7.4 with JDBC - Mailing list pgsql-general

From Kris Jurka
Subject Re: updateString error in PostgreSQL7.4 with JDBC
Date
Msg-id Pine.BSO.4.56.0411102322130.32418@leary.csoft.net
Whole thread Raw
In response to updateString error in PostgreSQL7.4 with JDBC  (Suha Onay <suha@liqia.com>)
List 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 by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: Postgresql future changes
Next
From: Bruce Momjian
Date:
Subject: Re: Proposal: GRANT cascade to implicit sequences