mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-01 09:24:55 +02:00
fixed GH #2807: Poco::Data::ODBC Binding of SQL Decimal Type
This commit is contained in:
parent
d658cc25e7
commit
c15b6191b6
@ -136,9 +136,18 @@ void ODBCMetaColumn::init()
|
||||
case SQL_DECIMAL:
|
||||
// Oracle has no INTEGER type - it's essentially NUMBER with 38 whole and
|
||||
// 0 fractional digits. It also does not recognize SQL_BIGINT type,
|
||||
// so the workaround here is to hardcode it to 32 bit integer
|
||||
if (0 == _columnDesc.decimalDigits) setType(MetaColumn::FDT_INT32);
|
||||
else setType(MetaColumn::FDT_DOUBLE);
|
||||
// so the workaround here is to hardcode it to 32 or 64 bit integer
|
||||
if (0 == _columnDesc.decimalDigits)
|
||||
{
|
||||
if (_columnDesc.size > 9)
|
||||
setType(MetaColumn::FDT_INT64);
|
||||
else
|
||||
setType(MetaColumn::FDT_INT32);
|
||||
}
|
||||
else
|
||||
{
|
||||
setType(MetaColumn::FDT_DOUBLE);
|
||||
}
|
||||
break;
|
||||
|
||||
case SQL_REAL:
|
||||
|
Loading…
x
Reference in New Issue
Block a user