summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2020-11-07 16:09:31 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-08 12:06:09 +0100
commit344e26ace0a65c23cb1020b5907639fa9a67255e (patch)
tree7d549f1f97962f4412e7fd22816eeee22f937646 /connectivity
parent20d125ce61561a2ab54a99d77112d83293820e70 (diff)
tdf#130596 FIREBIRD error in query input param when referred field is SQL_LONG
In addition, deal too with: - SQL_INT64 - SQL_FLOAT - SQL_BOOLEAN Change-Id: I542fbedcb01f1967a4d5d482cbb2edf7ed3bf757 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105434 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/firebird/PreparedStatement.cxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx
index e86f8cf80982..e4510b758055 100644
--- a/connectivity/source/drivers/firebird/PreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx
@@ -240,6 +240,30 @@ void SAL_CALL OPreparedStatement::setString(sal_Int32 nParameterIndex,
setShort(nParameterIndex, int32Value);
break;
}
+ case SQL_LONG:
+ {
+ sal_Int32 int32Value = sInput.toInt32();
+ setInt(nParameterIndex, int32Value);
+ break;
+ }
+ case SQL_INT64:
+ {
+ sal_Int64 int64Value = sInput.toInt64();
+ setLong(nParameterIndex, int64Value);
+ break;
+ }
+ case SQL_FLOAT:
+ {
+ float floatValue = sInput.toFloat();
+ setFloat(nParameterIndex, floatValue);
+ break;
+ }
+ case SQL_BOOLEAN:
+ {
+ bool boolValue = sInput.toBoolean();
+ setBoolean(nParameterIndex, boolValue);
+ break;
+ }
default:
::dbtools::throwSQLException(
"Incorrect type for setString",