#include "libpq-fe.h"
}
-static char rcsid[] = "$Id: libpq++.H,v 1.5 1999/10/04 15:17:06 momjian Exp $";
+static char rcsid[] = "$Id: libpq++.H,v 1.6 1999/10/06 03:00:16 momjian Exp $";
// ****************************************************************
~PgDatabase() {}; // close connection and clean up
// query result access
int Tuples();
+ int CmdTuples();
int Fields();
const char* FieldName(int field_num);
int FieldNum(const char *field_name);
* 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 $
*
*-------------------------------------------------------------------------
*/
int PgDatabase::CmdTuples()
{
-return PQcmdTuples (pgResult);
+char *a;
+
+ a = (char *)PQcmdTuples(pgResult);
+ if(NULL == a) return -1;
+
+return atoi(a);
}
* Copyright (c) 1994, Regents of the University of California
*
*
- * $Id: pgdatabase.h,v 1.4 1999/09/28 04:49:22 momjian Exp $
+ * $Id: pgdatabase.h,v 1.5 1999/10/06 03:00:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "pgconnection.h"
+#include <stdlib.h>
// ****************************************************************
//