fixed GH #1436: ODBC Bug: Unicode text(NVARCHAT) read from DB is truncated to half.

This commit is contained in:
Guenter Obiltschnig 2016-12-07 12:57:19 +01:00
parent 13b062c786
commit 22e746d1ce

View File

@ -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<std::string>& v
inline void Preparator::prepare(std::size_t pos, const UTF16String&)
{
prepareVariableLen<UTF16String::value_type>(pos, SQL_C_WCHAR, maxDataSize(pos), DT_CHAR);
prepareVariableLen<UTF16String::value_type>(pos, SQL_C_WCHAR, maxDataSize(pos), DT_WCHAR);
}