https://bugs.documentfoundation.org/show_bug.cgi?id=156530
--- Comment #18 from Julien Nabet <[email protected]> --- I gave a try with LONG part only for the moment with this patch: diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx index 35847d021ea0..53d1596a2608 100644 --- a/connectivity/source/drivers/firebird/PreparedStatement.cxx +++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx @@ -241,7 +241,19 @@ void SAL_CALL OPreparedStatement::setString(sal_Int32 nParameterIndex, } case SQL_LONG: { - sal_Int32 int32Value = sInput.toInt32(); + short sqlscale = pVar->sqlscale; + + OUString str1 = sInput; + if (sqlscale) + { + sal_Int32 posSep = str1.indexOf(u'.'); + if (posSep != -1) + { + OUString tmp = sInput.replaceAll(".", ""); + str1 = tmp.subView(0, posSep - sqlscale); + } + } + sal_Int32 int32Value = str1.toInt32(); setInt(nParameterIndex, int32Value); break; } I got the same result as first patch. I mean, - if sInput = 123.456 then sqlscale = 3 so the value is 123456 - if sInput = 2345.16 then sqlscale = 2 so the value is 234516 so I got the same as just removing "." -- You are receiving this mail because: You are the assignee for the bug.
