Am Dienstag, 20. Januar 2004 09:13 schrieb Kris Jurka:
> > "SQLException: -1" - whatever that means...
> > >java.sql.SQLException: -1 > at
> > org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateRow(AbstractJdbc2Result
> I don't understand what you're saying here. You claim that it works, but
> it also throws an SQLException? Could we see some more code to produce
> this? The attached file does not give me any errors.
Yes, exactly so.
The problem is a bit deeper and i have not fully tracked down it yet.
The main thing happening in my code where the problem appears is:
Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
ResultSet rs = stmt.executeQuery("SELECT * FROM mytesttable FOR UPDATE OF mytesttable;");
rs.previous();//show some other record
rs.next();//go back to modified one
//now the above record has strangely enough vanished from my ResultSet !!!
//how do i get it back? (the ResulSet gives me at that position the values of the previous-record instead)
rs.updateRow();//now i get the SQLException -1
The main problem is to reproduce the fact, that the record has vanished from the ResultSet.
With my code it does, with yours not.
It has nothing to do with a special table as it happens with all i tried, i assume, that i somehow
misconfigure the Statement/ResultSet although i can not imagine where.
In response to
pgsql-jdbc by date
|Next:||From: Vámos Balázs||Date: 2004-01-20 17:22:26|
|Subject: Lost connection after postgres restarted|
|Previous:||From: Alessandro Depase||Date: 2004-01-20 12:22:34|
|Subject: Re: problem in handling transactions + jdbc|