Re: Resultset problem or BUG !

From: Richard Huxton <dev(at)archonet(dot)com>
To: Elie Nacache <elie_nacache(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Resultset problem or BUG !
Date: 2004-08-11 14:35:23
Message-ID: 411A2EAB.2040005@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Elie Nacache wrote:
> Hi Richard,
>
> Some informations: ============== OS: RedHat DB: PostgreSQL 7.4.3
> Driver: PostgreSQL 7.4.2 JDBC3 with SSL (build 213)

OK - I'm not a java expert, so if no-one else has anything better to
say, please post this on the jdbc mailing list instead. They'll be able
to help you for sure.

> Here some code: ============ INFO >> sqlDatas is of type ResultSet
> INFO >> Step first insert new row
>
> this.sqlDatas.moveToInsertRow(); this.updateColumns();
> this.sqlDatas.insertRow(); this.sqlLineNumber =
> this.sqlDatas.getRow(); // INFO >> return 0
>
> INFO >> At this step there is no commit INFO >> Second step update
> the row after collecting updated info
>
> this.sqlDatas.absolute(this.sqlLineNumber); // INFO >> throw the
> exception this.updateColumns(); this.sqlDatas.updateRow();

What is "sqlLineNumber"? I'm not familiar with that attribute off the
top of my head. The exception was complaining that .absolute() couldn't
move to row 0 which seems correct .absolute(1) is the first row. So -
what is "sqlLineNumber" and why is it zero?

> INFO >> If I fix the sqlLineNumber to 1 and force the absolute(1)
> then no Execption is thrown but the modification is not seen in the
> table.

The easiest way to see why the change isn't seen is to turn statement
logging on in PostgreSQL (and tell it to reload its config file).

--
Richard Huxton
Archonet Ltd

Browse pgsql-general by date

  From Date Subject
Next Message David Garamond 2004-08-11 14:38:36 Re: psql: immediately exit after an error?
Previous Message Nick Barr 2004-08-11 14:28:17 Re: POSIX RE starting with a (