diff options
author | randomdan <randomdan@localhost> | 2010-07-15 22:51:10 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2010-07-15 22:51:10 +0000 |
commit | 639cdeed5247d5ddc3ac8889688767c6f0da559c (patch) | |
tree | 186301a8e606a9959e089669cc7f2d179abfa506 /libodbcpp/error.cpp | |
parent | Implement connection caching and checking (requires ODBCv3 driver) (diff) | |
download | libdbpp-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/error.cpp')
-rw-r--r-- | libodbcpp/error.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libodbcpp/error.cpp b/libodbcpp/error.cpp index 3d55fc2..51b90c6 100644 --- a/libodbcpp/error.cpp +++ b/libodbcpp/error.cpp @@ -2,6 +2,7 @@ #include <stdio.h> #include <syslog.h> #include <malloc.h> +#include <time.h> #include "error.h" static @@ -69,7 +70,7 @@ ODBC::Error::Error(RETCODE err, SQLSMALLINT handletype, SQLHANDLE handle, char c va_list ap; va_start(ap, action); - odbc_verror(err, handletype, handle, action, ap, &msg); + odbc_verror(err, handletype, handle, action, ap, &msg); va_end(ap); } @@ -85,6 +86,10 @@ ODBC::Error::Error(char const * action, ...) va_end(ap); } +ODBC::Error::Error(char * m) : msg(m) +{ +} + ODBC::Error::~Error() throw() { free(msg); |