Skip to content

Commit 79485f5

Browse files
committed
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.
1 parent 7a23a03 commit 79485f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Data/ODBC/include/Poco/Data/ODBC/Preparator.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ class ODBC_API Preparator : public AbstractPreparator
554554

555555
case MetaColumn::FDT_UUID:
556556
if (pVal)
557-
return prepareFixedSize<Poco::UUID>(pos, SQL_C_BINARY, 16);
557+
return prepareFixedSize<Poco::UUID>(pos, SQL_C_BINARY, pVal->size());
558558
else
559559
return prepareFixedSize<Poco::UUID>(pos, SQL_C_BINARY);
560560

@@ -1185,7 +1185,7 @@ inline void Preparator::prepare(std::size_t pos, const std::list<Poco::DateTime>
11851185

11861186
inline void Preparator::prepare(std::size_t pos, const Poco::UUID&)
11871187
{
1188-
prepareCharArray<char, DT_CHAR_ARRAY>(pos, SQL_C_BINARY, 16, 16);
1188+
prepareVariableLen<char>(pos, SQL_C_BINARY, 16, DT_CHAR);
11891189
}
11901190

11911191

0 commit comments

Comments
 (0)