diff --git a/Data/ODBC/include/Poco/Data/ODBC/Preparator.h b/Data/ODBC/include/Poco/Data/ODBC/Preparator.h index 586c14498..a9246cd15 100644 --- a/Data/ODBC/include/Poco/Data/ODBC/Preparator.h +++ b/Data/ODBC/include/Poco/Data/ODBC/Preparator.h @@ -633,7 +633,7 @@ private: (SQLUSMALLINT) pos + 1, valueType, (SQLPOINTER) pCache, - (SQLINTEGER) size, + (SQLINTEGER) size*sizeof(T), &_lengths[pos]))) { throw StatementException(_rStmt, "SQLBindCol()"); @@ -1040,7 +1040,7 @@ inline void Preparator::prepare(std::size_t pos, const std::list& v inline void Preparator::prepare(std::size_t pos, const UTF16String&) { - prepareVariableLen(pos, SQL_C_WCHAR, maxDataSize(pos), DT_CHAR); + prepareVariableLen(pos, SQL_C_WCHAR, maxDataSize(pos), DT_WCHAR); }