On Mon, 29 Oct 2007, Prasanth Reddy wrote:
> Should the below code throw an SQLException?
> 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.
It's not clear. Reading the JDBC spec it doesn't seem to say anything
about fetching data from a partially updated ResultSet. Also note that
this doesn't work as you might expect for an update of a regular ResultSet
int i = rs.getInt(1);
// here j will be == i, not i+1.
int j = rs.getInt(1);
We store the pending values in a separate area because it makes things
like cancelRowUpdates or just navigating away from the updated row without
issuing updateRow easy. While I can see the utility of being able to
fetch the updated values, it would complicate the driver, so I'm not
excited about it unless you can point to some documentation that says we
In response to
pgsql-jdbc by date
|Next:||From: Dave Cramer||Date: 2007-12-01 12:35:38|
|Subject: Re: prepared statement using postgres array|
|Previous:||From: Kris Jurka||Date: 2007-12-01 09:19:17|
|Subject: Re: "create type" custom types not supported by JDBC|