X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 018BB3A3ED3 for ; Fri, 19 Nov 2004 02:26:27 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 29134-03 for ; Fri, 19 Nov 2004 02:26:17 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id CB8C63A4888 for ; Fri, 19 Nov 2004 02:26:19 +0000 (GMT) Received: from flood.opencloud.co.nz ([192.168.0.31]) by yass.opencloud.co.nz with esmtp (Exim 3.35 #1 (Debian)) id 1CUyIW-0000MW-00; Fri, 19 Nov 2004 15:14:52 +1300 Message-ID: <419D571B.7080609@opencloud.com> Date: Fri, 19 Nov 2004 15:14:51 +1300 From: Oliver Jowett User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: jessica xingzc_he Cc: pgsql-jdbc@postgresql.org Subject: Re: deleteRow or updateRow after insertRow References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/148 X-Sequence-Number: 11570 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