summaryrefslogtreecommitdiff
path: root/libodbcpp/selectcommand.cpp
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2010-08-30 17:34:02 +0000
committerrandomdan <randomdan@localhost>2010-08-30 17:34:02 +0000
commit685587ddb7af3a943a1dd5837fcfeeb779cf15b1 (patch)
treea376a877feb1b1689481655844648a20a884d4f8 /libodbcpp/selectcommand.cpp
parentFix early assign of insCmd in sqlmerge (diff)
downloadlibdbpp-odbc-685587ddb7af3a943a1dd5837fcfeeb779cf15b1.tar.bz2
libdbpp-odbc-685587ddb7af3a943a1dd5837fcfeeb779cf15b1.tar.xz
libdbpp-odbc-685587ddb7af3a943a1dd5837fcfeeb779cf15b1.zip
Remove lots of overkill variations of string stuff and have a vector<char> deal with the memory
Diffstat (limited to 'libodbcpp/selectcommand.cpp')
-rw-r--r--libodbcpp/selectcommand.cpp6
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;
}