fix(data/odbc): change the preparing of uuid column type so that isNull() can properly get the actual size and check if it is null.

This commit is contained in:
cliu
2025-09-12 15:45:54 +08:00
committed by Matej Kenda
parent 5144cea871
commit 2bdeaff849

View File

@@ -554,7 +554,7 @@ private:
case MetaColumn::FDT_UUID:
if (pVal)
return prepareFixedSize<Poco::UUID>(pos, SQL_C_BINARY, 16);
return prepareFixedSize<Poco::UUID>(pos, SQL_C_BINARY, pVal->size());
else
return prepareFixedSize<Poco::UUID>(pos, SQL_C_BINARY);
@@ -1185,7 +1185,7 @@ inline void Preparator::prepare(std::size_t pos, const std::list<Poco::DateTime>
inline void Preparator::prepare(std::size_t pos, const Poco::UUID&)
{
prepareCharArray<char, DT_CHAR_ARRAY>(pos, SQL_C_BINARY, 16, 16);
prepareVariableLen<char>(pos, SQL_C_BINARY, 16, DT_CHAR);
}