#4057: ODBC: SQL Anywhere Support (fix)

This commit is contained in:
Günter Obiltschnig 2023-06-11 09:59:49 +02:00
parent b391d86502
commit a00bfbe89f

View File

@ -518,7 +518,7 @@ void Binder::getColSizeAndPrecision(std::size_t pos,
{ {
found = _pTypeInfo->tryGetInfo(cDataType, "COLUMN_SIZE", tmp); found = _pTypeInfo->tryGetInfo(cDataType, "COLUMN_SIZE", tmp);
if (found) colSize = tmp; if (found) colSize = tmp;
if (actualSize > colSize) if (found && actualSize > colSize)
{ {
throw LengthExceededException(Poco::format("Error binding column %z size=%z, max size=%ld)", throw LengthExceededException(Poco::format("Error binding column %z size=%z, max size=%ld)",
pos, actualSize, static_cast<long>(colSize))); pos, actualSize, static_cast<long>(colSize)));