summaryrefslogtreecommitdiff
path: root/libodbcpp/param.cpp
diff options
context:
space:
mode:
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()) {