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>
This commit is contained in:
Lionel Elie Mamane
2017-12-27 10:17:24 +01:00
committed by Julien Nabet
parent 8375ab7b50
commit 3c567e55e6

View File

@@ -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)