pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedjdbc - number of updated rows
2+ messages / 2 participants
[nested] [flat]
* jdbc - number of updated rows
@ 1999-05-22 10:35 Piotr Stelmaszyk <kelman@fanthom.math.put.poznan.pl>
0 siblings, 0 replies; 2+ messages in thread
From: Piotr Stelmaszyk @ 1999-05-22 10:35 UTC (permalink / raw)
To: pgsql-interfaces
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@fanthom.math.put.poznan.pl ---------/
/----- mailto:kelman@alpha.net.pl -----------------------/
/--------------------------------------------------------/
^ permalink raw reply [nested|flat] 2+ messages in thread
* RE: [INTERFACES] jdbc - number of updated rows
@ 1999-05-27 08:06 Peter Mount <petermount@it.maidstone.gov.uk>
0 siblings, 0 replies; 2+ messages in thread
From: Peter Mount @ 1999-05-27 08:06 UTC (permalink / raw)
To: Piotr Stelmaszyk <kelman@fanthom.math.put.poznan.pl>; pgsql-interfaces
This is fixed in the current cvs version (I remember fixing it about 3
weeks ago).
--
Peter T Mount, Enterprise Support
petermount@it.maidstone.gov.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@fanthom.math.put.poznan.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@fanthom.math.put.poznan.pl ---------/
/----- mailto:kelman@alpha.net.pl -----------------------/
/--------------------------------------------------------/
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1999-05-27 08:06 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-05-22 10:35 jdbc - number of updated rows Piotr Stelmaszyk <kelman@fanthom.math.put.poznan.pl>
1999-05-27 08:06 RE: [INTERFACES] jdbc - number of updated rows Peter Mount <petermount@it.maidstone.gov.uk>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox