summaryrefslogtreecommitdiff
path: root/libodbcpp/param.cpp
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2010-08-12 23:04:37 +0000
committerrandomdan <randomdan@localhost>2010-08-12 23:04:37 +0000
commit1cf9af23ba071b152697ef81e64cc35988b1b8b2 (patch)
tree0849a5fdd0978c69afec854a3deca9f549d84cad /libodbcpp/param.cpp
parentTidy up hierarchy (diff)
downloadlibdbpp-odbc-1cf9af23ba071b152697ef81e64cc35988b1b8b2.tar.bz2
libdbpp-odbc-1cf9af23ba071b152697ef81e64cc35988b1b8b2.tar.xz
libdbpp-odbc-1cf9af23ba071b152697ef81e64cc35988b1b8b2.zip
Fix early assign of insCmd in sqlmerge
Fix bad use of length in binding string
Diffstat (limited to 'libodbcpp/param.cpp')
-rw-r--r--libodbcpp/param.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libodbcpp/param.cpp b/libodbcpp/param.cpp
index a86bce0..c4d2223 100644
--- a/libodbcpp/param.cpp
+++ b/libodbcpp/param.cpp
@@ -118,7 +118,7 @@ ODBC::Command::bindParamS(unsigned int i, const char * val, size_t len)
{
if (i < params.size()) {
_Param<Glib::ustring>* p = Param::makeParam<Glib::ustring>(params[i]);
- p->value.assign(val, len);
+ p->value.assign(val);
p->bindLen = len;
p->bind(this->hStmt, i + 1, SQL_C_CHAR, SQL_CHAR, 0, 0, p->value.data(), p->value.bytes());
return;