From: jessica xingzc_he <xingzc_he@hotmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: deleteRow or updateRow after insertRow
Date: Thu, 18 Nov 2004 21:34:51 -0700
Message-ID: <BAY24-F2FCA7FF96E6DC04AFB21B9CC30@phx.gbl> (raw)
In-Reply-To: <419D571B.7080609@opencloud.com>
it seems that moveToCurrentRow(), first(), last(), etc. work after
insertRow(). But using absolute() to navigate some row else does not.
>From: Oliver Jowett <oliver@opencloud.com>
>To: jessica xingzc_he <xingzc_he@hotmail.com>
>CC: pgsql-jdbc@postgresql.org
>Subject: Re: [JDBC] deleteRow or updateRow after insertRow
>Date: Fri, 19 Nov 2004 15:14:51 +1300
>
>jessica xingzc_he wrote:
>
>>I do first:
>>ResultSet.moveToInsertRow();
>>ResultSet.update...(1, ...);
>>....
>>rs.insertRow(); // a new row inserted into table
>>
>>but after that, I may move to some other row, say using
>>Result.absolute(..) or so, and then
>>1. update
>>ResultSet.update...(1, ...);
>>...
>>ResultSet.updateRow(); // it does not update the corresponding row in the
>>table, but also no
>> exception thrown.
>>
>>2. delete
>>ResultSet.deleteRow(); // throws exception: Can not call deleteRow() when
>>on insert row.
>
>Both cases sound like the driver thinks you are on the insert row. Are you
>sure that you are navigating away from the insert row after calling
>insertRow() and are not returning to it for some reason?
>
>Does the problem still occur if you use the latest development driver? If
>so, do you have a testcase that demonstrates it?
>
>It looks like updateRow when on the insert row is handle incorrectly :we
>should throw an exception according to the javadoc, but we silently do
>nothing. I will fix this in the development driver shortly. It won't help
>your problem, though..
>
>-O
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: xingzc_he@hotmail.com
Subject: Re: deleteRow or updateRow after insertRow
In-Reply-To: <BAY24-F2FCA7FF96E6DC04AFB21B9CC30@phx.gbl>
References: <419D571B.7080609@opencloud.com> <BAY24-F2FCA7FF96E6DC04AFB21B9CC30@phx.gbl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox