Skip site navigation (1) Skip section navigation (2)

deleteRow or updateRow after insertRow

From: "jessica xingzc_he" <xingzc_he(at)hotmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: deleteRow or updateRow after insertRow
Date: 2004-11-18 22:39:22
Message-ID: BAY24-F31DC8EA10052A0538BC2D09CC20@phx.gbl (view raw or flat)
Thread:
Lists: pgsql-jdbc
does anyone know why this happen?

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.

anybody has any clue? thanks

zhenchang



Responses

pgsql-jdbc by date

Next:From: Ian PilcherDate: 2004-11-18 22:53:22
Subject: Why IDENT doesn't work with JDBC
Previous:From: Oliver JowettDate: 2004-11-18 22:22:37
Subject: Re: how to create an object of java.sql.Array

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group