diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-28 10:30:40 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-28 10:30:40 +0100 |
commit | 8ae7b81f9e6c994bdec7253ef13f2859af965f99 (patch) | |
tree | 052905fa50ce5ad681e77c9b9d6574315e5e5027 /connectivity/source/drivers/ado | |
parent | 315ad807a74502fc4020578f50c56edf67ef1fa4 (diff) | |
parent | e5c996ff19312b2a5608fde3d39839507fca35c2 (diff) |
Automated merge with ssh://hg@hg.services.openoffice.org/cws/dba34b
Diffstat (limited to 'connectivity/source/drivers/ado')
-rw-r--r-- | connectivity/source/drivers/ado/AColumn.cxx | 5 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/AConnection.cxx | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx index aa287c185b26..510c2790e777 100644 --- a/connectivity/source/drivers/ado/AColumn.cxx +++ b/connectivity/source/drivers/ado/AColumn.cxx @@ -165,7 +165,8 @@ void OAdoColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& r { sal_Int32 nVal=0; rValue >>= nVal; - m_aColumn.put_NumericScale((sal_Int8)nVal); + if ( !m_IsCurrency ) + m_aColumn.put_NumericScale((sal_Int8)nVal); } break; case PROPERTY_ID_ISNULLABLE: @@ -212,6 +213,8 @@ void OAdoColumn::fillPropertyValues() DataTypeEnum eType = m_aColumn.get_Type(); m_IsCurrency = (eType == adCurrency); + if ( m_IsCurrency && !m_Scale) + m_Scale = 4; m_Type = ADOS::MapADOType2Jdbc(eType); sal_Bool bForceTo = sal_True; diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx index a7e2ec4df490..6596b9b8d946 100644 --- a/connectivity/source/drivers/ado/AConnection.cxx +++ b/connectivity/source/drivers/ado/AConnection.cxx @@ -466,6 +466,11 @@ void OConnection::buildTypeInfo() throw( SQLException) aInfo->aSimpleType.aLocalTypeName = ADOS::getField(pRecordset,nPos++).get_Value(); aInfo->aSimpleType.nMinimumScale = ADOS::getField(pRecordset,nPos++).get_Value(); aInfo->aSimpleType.nMaximumScale = ADOS::getField(pRecordset,nPos++).get_Value(); + if ( adCurrency == aInfo->eType && !aInfo->aSimpleType.nMaximumScale) + { + aInfo->aSimpleType.nMinimumScale = 4; + aInfo->aSimpleType.nMaximumScale = 4; + } aInfo->aSimpleType.nNumPrecRadix = ADOS::getField(pRecordset,nPos++).get_Value(); // Now that we have the type info, save it // in the Hashtable if we don't already have an |