summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorjucasaca <jucasaca@gmail.com>2024-04-03 18:15:39 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2024-04-18 16:19:04 +0200
commit7edca7dc740f6877fa85c2a996ca869c6b971a48 (patch)
tree5d627cea026d412fb58854d6d5213708c40f312d /connectivity
parente1268721d4266ed1254da99581a7c2c3dfb72ba6 (diff)
tdf#158056 Connect to MS Access .mdb files by mean of ACE.OLEDB.12.0 provider
* Modify the code so that all connections to MS Access files, both .mdb and .accdb are made with the provider "Microsoft.ACE.OLEDB.12.0". * Remove all references to the "Microsoft.Jet.OLEDB.4.0" provider to clean up the code. * Leave only one entry "Microsoft Access" in the Connection Wizard, which would work for .mdb and .accdb files. * Remove the entry "Microsoft Access 2007" from the Connection Wizard, since it is no longer needed. Change-Id: If523712d071199d61e0c994b35291d3a69246ad1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165756 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/registry/ado/org/openoffice/Office/DataAccess/Drivers.xcu19
-rw-r--r--connectivity/source/drivers/ado/AConnection.cxx6
2 files changed, 5 insertions, 20 deletions
diff --git a/connectivity/registry/ado/org/openoffice/Office/DataAccess/Drivers.xcu b/connectivity/registry/ado/org/openoffice/Office/DataAccess/Drivers.xcu
index 288c23e2e497..28f915ff8e3e 100644
--- a/connectivity/registry/ado/org/openoffice/Office/DataAccess/Drivers.xcu
+++ b/connectivity/registry/ado/org/openoffice/Office/DataAccess/Drivers.xcu
@@ -214,7 +214,7 @@
</node>
</node>
</node>
- <node oor:name="sdbc:ado:access:PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=*" oor:op="replace">
+ <node oor:name="sdbc:ado:access:Provider=Microsoft.ACE.OLEDB.12.0;DATA SOURCE=*" oor:op="replace">
<prop oor:name="Driver">
<value>com.sun.star.comp.sdbc.ado.ODriver</value>
</prop>
@@ -340,7 +340,7 @@
</node>
<node oor:name="Extension" oor:op="replace">
<prop oor:name="Value" oor:type="xs:string">
- <value>mdb</value>
+ <value></value>
</prop>
</node>
<node oor:name="SupportsColumnDescription" oor:op="replace">
@@ -350,20 +350,5 @@
</node>
</node>
</node>
- <node oor:name="sdbc:ado:access:Provider=Microsoft.ACE.OLEDB.12.0;DATA SOURCE=*" oor:op="replace">
- <prop oor:name="ParentURLPattern">
- <value>sdbc:ado:access:PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=*</value>
- </prop>
- <prop oor:name="DriverTypeDisplayName" oor:type="xs:string">
- <value xml:lang="en-US">Microsoft Access 2007</value>
- </prop>
- <node oor:name="MetaData">
- <node oor:name="Extension" oor:op="replace">
- <prop oor:name="Value" oor:type="xs:string">
- <value></value>
- </prop>
- </node>
- </node>
- </node>
</node>
</oor:component-data>
diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx
index 686a9fed58aa..b879e1b11801 100644
--- a/connectivity/source/drivers/ado/AConnection.cxx
+++ b/connectivity/source/drivers/ado/AConnection.cxx
@@ -121,9 +121,9 @@ void OConnection::construct(std::u16string_view url,const Sequence< PropertyValu
WpADOProperties aProps = m_aAdoConnection.get_Properties();
if(aProps.IsValid())
{
- OTools::putValue(aProps, std::u16string_view(u"Jet OLEDB:ODBC Parsing"), true);
+ OTools::putValue(aProps, std::u16string_view(u"ACE OLEDB:ODBC Parsing"), true);
OLEVariant aVar(
- OTools::getValue(aProps, std::u16string_view(u"Jet OLEDB:Engine Type")));
+ OTools::getValue(aProps, std::u16string_view(u"ACE OLEDB:Engine Type")));
if(!aVar.isNull() && !aVar.isEmpty())
m_nEngineType = aVar.getInt32();
}
@@ -184,7 +184,7 @@ OUString SAL_CALL OConnection::nativeSQL( const OUString& _sql )
WpADOProperties aProps = m_aAdoConnection.get_Properties();
if(aProps.IsValid())
{
- OTools::putValue(aProps, std::u16string_view(u"Jet OLEDB:ODBC Parsing"), true);
+ OTools::putValue(aProps, std::u16string_view(u"ACE OLEDB:ODBC Parsing"), true);
WpADOCommand aCommand;
aCommand.Create();
aCommand.put_ActiveConnection(static_cast<IDispatch*>(m_aAdoConnection));