summaryrefslogtreecommitdiff
path: root/libodbcpp
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2010-09-16 18:55:42 +0000
committerrandomdan <randomdan@localhost>2010-09-16 18:55:42 +0000
commit225b2fdd892ba7b1ba3c4d5ce73d59bd97ac8004 (patch)
treef3555c7a943d4f5559a7b06ab982fba9d8c5a9c6 /libodbcpp
parentFix ustring builders from chararraycolumn (diff)
downloadlibdbpp-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')
-rw-r--r--libodbcpp/column.cpp11
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();
}
}
}