summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2019-08-30 16:59:58 +0200
committerJulien Nabet <serval2412@yahoo.fr>2019-08-31 05:37:08 +0200
commit50785ac52579153ed78a4fba268a54fd4d0e710e (patch)
tree46ca90062b2411d9bb116d92c7400ee7564f5c6d /connectivity
parent4e527f55d74e3220873075a8ec2799e2206fdb2d (diff)
tdf#118809: Fill DatabaseProductName and DatabaseProductVersion for Firebird
Thank you to Drew Jensen for the suggestion here: https://bugs.documentfoundation.org/show_bug.cgi?id=118809#c3 Change-Id: Ie9b5a2c744b158100b2306b27b1d56a30afc5182 Reviewed-on: https://gerrit.libreoffice.org/78302 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/firebird/DatabaseMetaData.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
index f73cc5e62a8d..57af351924e3 100644
--- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
@@ -598,12 +598,17 @@ OUString SAL_CALL ODatabaseMetaData::getDriverVersion()
OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion( )
{
- return OUString();
+ uno::Reference< XStatement > xSelect = m_pConnection->createStatement();
+
+ uno::Reference< XResultSet > xRs = xSelect->executeQuery("SELECT rdb$get_context('SYSTEM', 'ENGINE_VERSION') as version from rdb$database");
+ xRs->next(); // first and only row
+ uno::Reference< XRow > xRow( xRs, UNO_QUERY_THROW );
+ return xRow->getString(1);
}
OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName( )
{
- return OUString();
+ return "Firebird (engine12)";
}
OUString SAL_CALL ODatabaseMetaData::getProcedureTerm( )