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:
committed by
Julien Nabet
parent
8375ab7b50
commit
3c567e55e6
@@ -191,9 +191,11 @@ namespace dbaui
|
|||||||
{
|
{
|
||||||
// create a statement
|
// create a statement
|
||||||
Reference< XStatement > xStatement = m_xConnection->createStatement();
|
Reference< XStatement > xStatement = m_xConnection->createStatement();
|
||||||
|
|
||||||
|
Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData();
|
||||||
css::uno::Reference< css::sdbc::XMultipleResults > xMR ( xStatement, UNO_QUERY );
|
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);
|
bool hasRS = xStatement->execute(_rStatement);
|
||||||
if(hasRS)
|
if(hasRS)
|
||||||
|
Reference in New Issue
Block a user