diff options
Diffstat (limited to 'libodbcpp/selectcommand.cpp')
-rw-r--r-- | libodbcpp/selectcommand.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libodbcpp/selectcommand.cpp b/libodbcpp/selectcommand.cpp index 97102ab..88a071f 100644 --- a/libodbcpp/selectcommand.cpp +++ b/libodbcpp/selectcommand.cpp @@ -87,9 +87,9 @@ ODBC::SelectCommand::execute() case SQL_VARCHAR: case SQL_LONGVARCHAR: { - _Column<SQLCHAR*>* s = new _Column<SQLCHAR*>(colName, col); - s->value = new SQLCHAR[bindSize + 1]; - s->bind(hStmt, sqlcol, SQL_C_CHAR, s->value, bindSize + 1); + _Column<SQLCHARVEC>* s = new _Column<SQLCHARVEC>(colName, col); + s->value.resize(bindSize + 1); + s->bind(hStmt, sqlcol, SQL_C_CHAR, &s->value[0], bindSize + 1); columns[col] = s; break; } |