From 1ede41e012f7363a0d2804e70be0f6c772997e82 Mon Sep 17 00:00:00 2001 From: randomdan Date: Fri, 2 Apr 2010 01:05:25 +0000 Subject: lots of gcc warning fixes and a few newbies --- libodbcpp/column.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'libodbcpp/column.cpp') 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::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) +} -- cgit v1.2.3