mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-18 00:15:27 +01:00
Fixed ODBC WString size handling.
This fixes a bug where Poco would return a string 1 character shorter than is actually in the DB (when the string in the DB uses the full length of a CHAR(N) or VARCHAR(N) column).
This commit is contained in:
parent
ee25a49e9b
commit
d434d3cb12
@ -152,7 +152,8 @@ std::size_t Preparator::maxDataSize(std::size_t pos) const
|
||||
sz = mc.length();
|
||||
|
||||
// accomodate for terminating zero (non-bulk only!)
|
||||
if (!isBulk() && ODBCMetaColumn::FDT_STRING == mc.type()) ++sz;
|
||||
MetaColumn::ColumnDataType type = mc.type();
|
||||
if (!isBulk() && ((ODBCMetaColumn::FDT_WSTRING == type) || (ODBCMetaColumn::FDT_STRING == type))) ++sz;
|
||||
}
|
||||
catch (StatementException&) { }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user