summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/formattedcolumnvalue.cxx13
-rw-r--r--connectivity/source/drivers/odbcbase/OTools.cxx2
2 files changed, 11 insertions, 4 deletions
diff --git a/connectivity/source/commontools/formattedcolumnvalue.cxx b/connectivity/source/commontools/formattedcolumnvalue.cxx
index 3707b7fdb65d..d63c83524389 100644
--- a/connectivity/source/commontools/formattedcolumnvalue.cxx
+++ b/connectivity/source/commontools/formattedcolumnvalue.cxx
@@ -326,9 +326,16 @@ namespace dbtools
::rtl::OUString sStringValue;
if ( m_pData->m_xColumn.is() )
{
- sStringValue = DBTypeConversion::getValue(
- m_pData->m_xColumn, m_pData->m_xFormatter, m_pData->m_aNullDate, m_pData->m_nFormatKey, m_pData->m_nKeyType
- );
+ if ( m_pData->m_bNumericField )
+ {
+ sStringValue = DBTypeConversion::getValue(
+ m_pData->m_xColumn, m_pData->m_xFormatter, m_pData->m_aNullDate, m_pData->m_nFormatKey, m_pData->m_nKeyType
+ );
+ }
+ else
+ {
+ sStringValue = m_pData->m_xColumn->getString();
+ }
}
return sStringValue;
}
diff --git a/connectivity/source/drivers/odbcbase/OTools.cxx b/connectivity/source/drivers/odbcbase/OTools.cxx
index 43de55e3505c..d598de8bc12d 100644
--- a/connectivity/source/drivers/odbcbase/OTools.cxx
+++ b/connectivity/source/drivers/odbcbase/OTools.cxx
@@ -578,7 +578,7 @@ Sequence<sal_Int8> OTools::getBytesValue(OConnection* _pConnection,
// StarView zu lang ist oder der Treiber kann die Laenge der
// Daten nicht im voraus bestimmen - also als MemoryStream
// speichern.
- while ((pcbValue == SQL_NO_TOTAL ) || pcbValue > nMaxLen)
+ while ((pcbValue == SQL_NO_TOTAL ) || nLen > nMaxLen)
{
// Bei Strings wird der Puffer nie ganz ausgenutzt
// (das letzte Byte ist immer ein NULL-Byte, das