summaryrefslogtreecommitdiff
path: root/libodbcpp/column.cpp
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2010-04-02 01:05:25 +0000
committerrandomdan <randomdan@localhost>2010-04-02 01:05:25 +0000
commit1ede41e012f7363a0d2804e70be0f6c772997e82 (patch)
tree86671e425d8f66fa16ce1989dbdc4fac45853295 /libodbcpp/column.cpp
parentLots of little fixes (diff)
downloadlibdbpp-odbc-1ede41e012f7363a0d2804e70be0f6c772997e82.tar.bz2
libdbpp-odbc-1ede41e012f7363a0d2804e70be0f6c772997e82.tar.xz
libdbpp-odbc-1ede41e012f7363a0d2804e70be0f6c772997e82.zip
lots of gcc warning fixes and a few newbies
Diffstat (limited to 'libodbcpp/column.cpp')
-rw-r--r--libodbcpp/column.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/libodbcpp/column.cpp b/libodbcpp/column.cpp
index 58f9b31..0d0e6e2 100644
--- a/libodbcpp/column.cpp
+++ b/libodbcpp/column.cpp
@@ -1,4 +1,5 @@
#include "column.h"
+#include "command.h"
#include "error.h"
#include "timetypepair.h"
@@ -51,4 +52,20 @@ ODBC::Column::bind(SQLHANDLE hStmt, SQLUINTEGER col, SQLSMALLINT ctype, void * b
}
}
+#define REBIND(t, p) \
+ template<> void _Column<t>::rebind(Command * cmd, unsigned int col) const \
+ { \
+ cmd->p(col, value); \
+ }
+namespace ODBC {
+ REBIND(int, bindParamI)
+ REBIND(long, bindParamI)
+ REBIND(unsigned int, bindParamI)
+ REBIND(long unsigned int, bindParamI)
+ REBIND(long long unsigned int, bindParamI)
+ REBIND(double, bindParamF)
+ REBIND(float, bindParamF)
+ REBIND(TimeTypePair, bindParamT)
+ REBIND(unsigned char *, bindParamS)
+}