https://bugs.documentfoundation.org/show_bug.cgi?id=156530
--- Comment #12 from Julien Nabet <[email protected]> --- I gave a try with this patch: diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx index 35847d021ea0..529ab8a39cde 100644 --- a/connectivity/source/drivers/firebird/PreparedStatement.cxx +++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx @@ -227,7 +227,7 @@ void SAL_CALL OPreparedStatement::setString(sal_Int32 nParameterIndex, break; case SQL_SHORT: { - sal_Int32 int32Value = sInput.toInt32(); + sal_Int32 int32Value = sInput.replaceAll(".", "").toInt32(); if ( (int32Value < std::numeric_limits<sal_Int16>::min()) || (int32Value > std::numeric_limits<sal_Int16>::max()) ) { @@ -241,13 +241,13 @@ void SAL_CALL OPreparedStatement::setString(sal_Int32 nParameterIndex, } case SQL_LONG: { - sal_Int32 int32Value = sInput.toInt32(); + sal_Int32 int32Value = sInput.replaceAll(".", "").toInt32(); setInt(nParameterIndex, int32Value); break; } case SQL_INT64: { - sal_Int64 int64Value = sInput.toInt64(); + sal_Int64 int64Value = sInput.replaceAll(".", "").toInt64(); setLong(nParameterIndex, int64Value); break; } Remarks: 1) the "replaceAll" is required for both SQL_LONG and SQL_INT64, so concerning SQL_SHORT it was more to be the same way 2) It was OK with French UI so I supposed it's not useful to test if decimal separator was ".", "," or whatever. Indeed it seemed to me only the internal representation of the value (which I expect always use ".") must be used. Result: non decimal part is ok but not the decimal part, we lose some precision Conclusion: not the right thing to do :-( -- You are receiving this mail because: You are the assignee for the bug.
