1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

CmdTuples() returns an int showing the number of affected tuples after an

insert, update or delete.  It will return -1 on error, although I've yet
to an error situation to prove that out!


Vince
This commit is contained in:
Bruce Momjian
1999-10-06 03:00:16 +00:00
parent 0eac2922ec
commit 56ba75cb53
3 changed files with 11 additions and 4 deletions

View File

@ -10,7 +10,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgdatabase.cc,v 1.6 1999/09/28 12:59:29 momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgdatabase.cc,v 1.7 1999/10/06 03:00:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -63,7 +63,12 @@ return PQntuples(pgResult);
int PgDatabase::CmdTuples()
{
return PQcmdTuples (pgResult);
char *a;
a = (char *)PQcmdTuples(pgResult);
if(NULL == a) return -1;
return atoi(a);
}