summaryrefslogtreecommitdiff
path: root/libodbcpp/connection.h
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2010-07-15 22:51:10 +0000
committerrandomdan <randomdan@localhost>2010-07-15 22:51:10 +0000
commit639cdeed5247d5ddc3ac8889688767c6f0da559c (patch)
tree186301a8e606a9959e089669cc7f2d179abfa506 /libodbcpp/connection.h
parentImplement connection caching and checking (requires ODBCv3 driver) (diff)
downloadlibdbpp-odbc-639cdeed5247d5ddc3ac8889688767c6f0da559c.tar.bz2
libdbpp-odbc-639cdeed5247d5ddc3ac8889688767c6f0da559c.tar.xz
libdbpp-odbc-639cdeed5247d5ddc3ac8889688767c6f0da559c.zip
Cache that a DSN is unavailable for 60sec
Diffstat (limited to 'libodbcpp/connection.h')
-rw-r--r--libodbcpp/connection.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libodbcpp/connection.h b/libodbcpp/connection.h
index 82caf22..0d2e9d4 100644
--- a/libodbcpp/connection.h
+++ b/libodbcpp/connection.h
@@ -2,6 +2,7 @@
#define CONNECTION_H
#include "dsn.h"
+#include "error.h"
#include <sql.h>
namespace ODBC {
@@ -26,6 +27,13 @@ namespace ODBC {
mutable unsigned int txDepth;
mutable bool txAborted;
};
+ class ConnectionError : public Error {
+ public:
+ ConnectionError(RETCODE err, SQLSMALLINT handletype, SQLHANDLE handle, char const * stage);
+ ConnectionError(const ConnectionError &);
+
+ const time_t FailureTime;
+ };
}
#endif