summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2015-12-13 19:24:44 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2015-12-13 18:28:50 +0000
commit76d3e87113da51ea515d1d0a84a17cdb0f70d5c4 (patch)
tree3a41e9446ac04f350ed17b46bf96576e321c546e /connectivity
parent0df0ab1bc8530b5bc307e946f35e8f6be883c2d1 (diff)
ODBC SQLBindParameter nitpick: correct DecimalDigits for exact numeric values
The driver is supposed to ignore it as per the spec, but let's be conservative and pass the value defined by the spec. Leave it as invalid for approximate (floating-point) datatypes. Change-Id: I542fdde5e711a335c708ad9e6f2abe2fd8632ef6 Reviewed-on: https://gerrit.libreoffice.org/20685 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/odbc/OPreparedStatement.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
index 95a9f21d7d4e..8d91ceb54ac9 100644
--- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx
+++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
@@ -415,7 +415,7 @@ void OPreparedStatement::setParameter(const sal_Int32 parameterIndex, const sal_
void SAL_CALL OPreparedStatement::setByte( const sal_Int32 parameterIndex, const sal_Int8 x ) throw(SQLException, RuntimeException, std::exception)
{
- setScalarParameter(parameterIndex, DataType::TINYINT, 3, x);
+ setScalarParameter(parameterIndex, DataType::TINYINT, 3, 0, x);
}
void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const Date& aData ) throw(SQLException, RuntimeException, std::exception)
@@ -501,7 +501,7 @@ void SAL_CALL OPreparedStatement::setFloat( sal_Int32 parameterIndex, float x )
void SAL_CALL OPreparedStatement::setInt( sal_Int32 parameterIndex, sal_Int32 x ) throw(SQLException, RuntimeException, std::exception)
{
- setScalarParameter(parameterIndex, DataType::INTEGER, 10, x);
+ setScalarParameter(parameterIndex, DataType::INTEGER, 10, 0, x);
}
@@ -509,7 +509,7 @@ void SAL_CALL OPreparedStatement::setLong( sal_Int32 parameterIndex, sal_Int64 x
{
try
{
- setScalarParameter(parameterIndex, DataType::BIGINT, 19, x);
+ setScalarParameter(parameterIndex, DataType::BIGINT, 19, 0, x);
}
catch(SQLException&)
{
@@ -635,7 +635,7 @@ void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any
void SAL_CALL OPreparedStatement::setShort( sal_Int32 parameterIndex, sal_Int16 x ) throw(SQLException, RuntimeException, std::exception)
{
- setScalarParameter(parameterIndex, DataType::SMALLINT, 5, x);
+ setScalarParameter(parameterIndex, DataType::SMALLINT, 5, 0, x);
}