diff options
author | randomdan <randomdan@localhost> | 2010-09-16 18:55:42 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2010-09-16 18:55:42 +0000 |
commit | 225b2fdd892ba7b1ba3c4d5ce73d59bd97ac8004 (patch) | |
tree | f3555c7a943d4f5559a7b06ab982fba9d8c5a9c6 /libodbcpp/column.cpp | |
parent | Fix ustring builders from chararraycolumn (diff) | |
download | libdbpp-odbc-225b2fdd892ba7b1ba3c4d5ce73d59bd97ac8004.tar.bz2 libdbpp-odbc-225b2fdd892ba7b1ba3c4d5ce73d59bd97ac8004.tar.xz libdbpp-odbc-225b2fdd892ba7b1ba3c4d5ce73d59bd97ac8004.zip |
Always rebind after a column alloc size change else ODBC doesn't know about the extra space
Diffstat (limited to 'libodbcpp/column.cpp')
-rw-r--r-- | libodbcpp/column.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libodbcpp/column.cpp b/libodbcpp/column.cpp index 9ed6143..828b4bc 100644 --- a/libodbcpp/column.cpp +++ b/libodbcpp/column.cpp @@ -28,15 +28,12 @@ ODBC::Column::resize(SQLHANDLE hStmt) void ODBC::CharArrayColumn::resize(SQLHANDLE hStmt) { - const char * addr = &data.front(); if (bindLen > SQLLEN(data.size())) { data.resize(bindLen + 1); - if (addr != &data.front()) { - Column::bind(); - if (paramCmd) { - paramBound = false; - Param::bind(); - } + Column::bind(); + if (paramCmd) { + paramBound = false; + Param::bind(); } } } |