RE: [INTERFACES] jdbc - number of updated rows

From: Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk>
To: Piotr Stelmaszyk <kelman(at)fanthom(dot)math(dot)put(dot)poznan(dot)pl>, PgSQL-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: RE: [INTERFACES] jdbc - number of updated rows
Date: 1999-05-27 08:06:36
Message-ID: A9DCBD548069D211924000C00D001C4427A9AB@exchange.maidstone.gov.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

This is fixed in the current cvs version (I remember fixing it about 3
weeks ago).

--
Peter T Mount, Enterprise Support
petermount(at)it(dot)maidstone(dot)gov(dot)uk
Anything I write here are my own views, and cannot be taken as the
official words of Maidstone Borough Council

-----Original Message-----
From: Piotr Stelmaszyk [mailto:kelman(at)fanthom(dot)math(dot)put(dot)poznan(dot)pl]
Sent: Saturday, May 22, 1999 11:35 AM
To: PgSQL-interfaces
Subject: [INTERFACES] jdbc - number of updated rows

Please tell me how to get to know how many rows has method
executeUpdate affected. According to documentation
<cut>
Returns:
either the row count for INSERT, UPDATE or DELETE ...
</cut>
this method should return number of updated rows, but it always
returns 1. It's a feature(bug) of postgresql jdbc-driver?

The only solution for my problem, that I made up is:

turn off auto-commit

select count(*) from table
where tID=5
-- now i (probably)know number of updated rows

update table set ...
where tID=5

commit

turn on auto-commit
-- stupid, isn't it ...

PS. remember that I'm new here...

/--------------------------------------------------------/
/- Piotr Stelmaszyk |---- Student of Computer Science ---/
/------------------ | at Poznan University of Technology /
/----- mailto:kelman(at)fanthom(dot)math(dot)put(dot)poznan(dot)pl ---------/
/----- mailto:kelman(at)alpha(dot)net(dot)pl -----------------------/
/--------------------------------------------------------/

Browse pgsql-interfaces by date

  From Date Subject
Next Message Peter Mount 1999-05-27 08:08:20 RE: [INTERFACES] Error with JDBC
Previous Message Peter Mount 1999-05-27 08:03:52 RE: [INTERFACES] jdbc - getArray