summaryrefslogtreecommitdiff
path: root/libodbcpp/param.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/param.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/param.cpp')
-rw-r--r--libodbcpp/param.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/libodbcpp/param.cpp b/libodbcpp/param.cpp
index a2a90f0..7bfa415 100644
--- a/libodbcpp/param.cpp
+++ b/libodbcpp/param.cpp
@@ -69,6 +69,20 @@ ODBC::Command::bindParamI(unsigned int i, int val)
throw Error("%s: Bind out of bounds", __FUNCTION__);
}
void
+ODBC::Command::bindParamI(unsigned int i, long val)
+{
+ if (i < params.size()) {
+ _Param<SQLINTEGER>* p = Param::makeParam<SQLINTEGER>(params[i]);
+ p->value = val;
+ if (!p->bound) {
+ p->bind(this->hStmt, i + 1, SQL_C_SLONG, SQL_C_LONG, 0, 0,
+ &p->value, sizeof(SQLINTEGER));
+ }
+ return;
+ }
+ throw Error("%s: Bind out of bounds", __FUNCTION__);
+}
+void
ODBC::Command::bindParamI(unsigned int i, long long unsigned int val)
{
if (i < params.size()) {