summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/ado/AColumn.cxx
diff options
context:
space:
mode:
authorOcke Janssen [oj] <Ocke.Janssen@oracle.com>2011-01-03 13:56:33 +0100
committerOcke Janssen [oj] <Ocke.Janssen@oracle.com>2011-01-03 13:56:33 +0100
commit3ff6379e53a0f47f56417a41937fe92996980cb8 (patch)
treee937fd742aa4867a3a0648548b8ad5a6a85a0fbc /connectivity/source/drivers/ado/AColumn.cxx
parent00d0b523b7913b534a6f7fef4f2a86e9472d0208 (diff)
dba34c: fix for cast and char compare
Diffstat (limited to 'connectivity/source/drivers/ado/AColumn.cxx')
-rw-r--r--connectivity/source/drivers/ado/AColumn.cxx5
1 files changed, 4 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;