diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2017-12-27 10:17:24 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2017-12-28 09:40:51 +0100 |
commit | 3c567e55e6aed9e0da892d8b9fc09f8a0c784fcc (patch) | |
tree | 6dc0c6004665ded8c1f23f01df0a9231fc5512d3 /dbaccess | |
parent | 8375ab7b5024bad1bcf8bbb0c734ba1e5416445f (diff) |
tdf#114702 don't use XMultipleResultset unless DatabaseMetaData says we can
Change-Id: Icec98d35c2f60adf4a31e492c6cb708e82e47a58
Reviewed-on: https://gerrit.libreoffice.org/47080
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/dlg/directsql.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx index 8d4cfc1946c7..8ea220d90d8e 100644 --- a/dbaccess/source/ui/dlg/directsql.cxx +++ b/dbaccess/source/ui/dlg/directsql.cxx @@ -191,9 +191,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) |