ResultSet.moveToCurrentRow was checking the cached updateability flag
authorKris Jurka <[email protected]>
Mon, 13 Sep 2004 07:14:26 +0000 (07:14 +0000)
committerKris Jurka <[email protected]>
Mon, 13 Sep 2004 07:14:26 +0000 (07:14 +0000)
assuming it had been set instead of correctly calling the
isUpdateable() method which sets the flag if needed.  This usually
worked because moveToCurrentRow is only useful after a
moveToInsertRow call which would set the flag, but this is not
required.

David Bucciarelli

src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java

index f9c947e409f9a5edda7d442f4c9842aa23297c44..c5272620d772b8434fb0518c099d6d15d077f091 100644 (file)
@@ -692,7 +692,7 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
        public synchronized void moveToCurrentRow()
        throws SQLException
        {
-               if (!updateable)
+               if (!isUpdateable())
                {
                        throw new PSQLException( "postgresql.updateable.notupdateable" );
                }