diff options
author | randomdan <randomdan@localhost> | 2010-08-30 17:34:02 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2010-08-30 17:34:02 +0000 |
commit | 685587ddb7af3a943a1dd5837fcfeeb779cf15b1 (patch) | |
tree | a376a877feb1b1689481655844648a20a884d4f8 /libodbcpp/selectcommand.cpp | |
parent | Fix early assign of insCmd in sqlmerge (diff) | |
download | libdbpp-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.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; } |