summaryrefslogtreecommitdiffstats
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 08:35:17 +0200
commit6155fae67c104dd38114a8888bacb31e19fe565d (patch)
tree6c9f533816f8ed1ae38fdd427c1eb26b87265736
parentUpdate git submodules (diff)
downloadcore-6155fae67c104dd38114a8888bacb31e19fe565d.tar.gz
core-6155fae67c104dd38114a8888bacb31e19fe565d.zip
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> (cherry picked from commit 50785ac52579153ed78a4fba268a54fd4d0e710e) Reviewed-on: https://gerrit.libreoffice.org/78335 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
-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 f3fad5ff3636..71543c013913 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( )