connectivity/source/drivers/odbc/OPreparedStatement.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 76d3e87113da51ea515d1d0a84a17cdb0f70d5c4
Author: Lionel Elie Mamane <[email protected]>
Date:   Sun Dec 13 19:24:44 2015 +0100

    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 <[email protected]>
    Tested-by: Lionel Elie Mamane <[email protected]>

diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx 
b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
index 95a9f21..8d91ceb 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);
 }
 
 
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to