projects
/
gnucomo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ead6049
)
New member function gnucomo_database::is_conected().
author
arjen
<arjen>
Sat, 29 Mar 2003 08:13:53 +0000
(08:13 +0000)
committer
arjen
<arjen>
Sat, 29 Mar 2003 08:13:53 +0000
(08:13 +0000)
src/include/database.h
patch
|
blob
|
history
diff --git
a/src/include/database.h
b/src/include/database.h
index
d77f7a2
..
b96c0b3
100644
(file)
--- a/
src/include/database.h
+++ b/
src/include/database.h
@@
-8,7
+8,7
@@
***********************
** FILE NAME : database.h
** SYSTEM NAME :
***********************
** FILE NAME : database.h
** SYSTEM NAME :
-** VERSION NUMBER : $Revision: 1.
6
$
+** VERSION NUMBER : $Revision: 1.
7
$
**
** DESCRIPTION : Classes to provide an abstract layer on the Gnucomo
** database.
**
** DESCRIPTION : Classes to provide an abstract layer on the Gnucomo
** database.
@@
-21,13
+21,16
@@
********************************
** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
** CREATION DATE : Sep 10, 2002
********************************
** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
** CREATION DATE : Sep 10, 2002
-** LAST UPDATE :
Jan 31
, 2003
+** LAST UPDATE :
Mar 28
, 2003
** MODIFICATIONS :
**************************************************************************/
/*****************************
$Log: database.h,v $
** MODIFICATIONS :
**************************************************************************/
/*****************************
$Log: database.h,v $
- Revision 1.6 2003-02-19 09:54:47 arjen
+ Revision 1.7 2003-03-29 08:13:53 arjen
+ New member function gnucomo_database::is_conected().
+
+ Revision 1.6 2003/02/19 09:54:47 arjen
Print the query on cerr, along with the error message when
the query results in an error.
Print the query on cerr, along with the error message when
the query results in an error.
@@
-49,7
+52,7
@@
*****************************/
*****************************/
-/* static const char *RCSID = "$Id: database.h,v 1.
6 2003-02-19 09:54:47
arjen Exp $"; */
+/* static const char *RCSID = "$Id: database.h,v 1.
7 2003-03-29 08:13:53
arjen Exp $"; */
#include <libpq++/pgdatabase.h>
#include "gnucomo_config.h"
#include <libpq++/pgdatabase.h>
#include "gnucomo_config.h"
@@
-66,7
+69,7
@@
//
// RELATIONS :
// SEE ALSO :
//
// RELATIONS :
// SEE ALSO :
-// LAST MODIFIED :
Jan 17
, 2003
+// LAST MODIFIED :
Mar 28
, 2003
///////////////////////////////////////////////////////////////////////////
*/
///////////////////////////////////////////////////////////////////////////
*/
@@
-85,6
+88,13
@@
public:
gnucomo_database(gnucomo_config *c); // Use the configuration to connect to the database
gnucomo_database(gnucomo_config *c); // Use the configuration to connect to the database
+ // Error checking and handling.
+
+ bool is_connected()
+ {
+ return db != 0 && db->Status() == CONNECTION_OK;
+ }
+
// Low-level database access functions
int Query(String qry)
// Low-level database access functions
int Query(String qry)