[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - dbaccess/source
Lionel Elie Mamane
lionel at mamane.lu
Thu Dec 28 10:28:41 UTC 2017
dbaccess/source/ui/dlg/directsql.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit bec82bc44813fb170602f523e8f7d541d1c94dcb
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Wed Dec 27 10:17:24 2017 +0100
tdf#114702 don't use XMultipleResultset unless DatabaseMetaData says we can
Change-Id: Icec98d35c2f60adf4a31e492c6cb708e82e47a58
(cherry picked from commit 3c567e55e6aed9e0da892d8b9fc09f8a0c784fcc)
Change-Id: If928bbe7985e36855dbf9d83fa09cdec2b48578e
Reviewed-on: https://gerrit.libreoffice.org/47124
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx
index dbb7a78eb8ca..1c3406693bfd 100644
--- a/dbaccess/source/ui/dlg/directsql.cxx
+++ b/dbaccess/source/ui/dlg/directsql.cxx
@@ -190,9 +190,11 @@ namespace dbaui
{
// create a statement
Reference< XStatement > xStatement = m_xConnection->createStatement();
+
+ Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData();
css::uno::Reference< css::sdbc::XMultipleResults > xMR ( xStatement, UNO_QUERY );
- if (xMR.is())
+ if (xMeta.is() && xMeta->supportsMultipleResultSets() && xMR.is())
{
bool hasRS = xStatement->execute(_rStatement);
if(hasRS)
More information about the Libreoffice-commits
mailing list