https://bugs.freedesktop.org/show_bug.cgi?id=43227
Bug #: 43227
Summary: FILEOPEN: UI to set workgroup (system DB) for opening
MS Access (.mdb) files
Classification: Unclassified
Product: LibreOffice
Version: unspecified
Platform: x86 (IA32)
OS/Version: Windows (All)
Status: UNCONFIRMED
Severity: enhancement
Priority: medium
Component: Database
AssignedTo: [email protected]
ReportedBy: [email protected]
MS Access uses a file it calls "Workgroup" to define valid user accounts and
passwords for its internal access control. The database engine underlying MS
Access, called "Jet", that the "System DB".
In Access 2003, it can be set through the UI: menu tools / security / Workgroup
manager, or with the "/workgroup" command-line switch. The story with Access
2007 is a bit more complicated, see http://support.microsoft.com/kb/918583 .
Our "connect to a Access file" wizard does not give users the possibility to
set which workgroup shall be used, and uses the Jet default, which is not
necessarily the same as the one MS Access uses. This leads to a frustrating
"opening a .mdb file does not work" for the user, as the MS Access default has
possibly been set by an Administrator and the user knows nothing about it.
Our "connect to Access file" UI should:
1) Use the same workgroup as MS Access by default
2) Allow it to be set differently
3) Allow the user to set a Username and password. Default to "Admin" and no
password.
Currently the only way to open a .mdb file with a specific workgroup is to
choose "connect to ADO" instead of "connect to Access", and in the ADO "browse"
UI, choose "Microsoft Jet 4.0 OLE DB Provider", go to the "All" and set
property "Jet OLEDB:System database".
The one used by MS Access 2003 is in the registry at
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Access\Jet\4.0\Engines\SystemDB
Access 2007 is probably similar. There is no notion of workgroup for a .accdb
file.
The file you need to change in LibreOffice is
dbaccess/source/ui/dlg/ConnectionHelper.cxx, in function
IMPL_LINK(OConnectionHelper, OnBrowseConnections, PushButton*, /*_pButton*/)
there is a big
switch ( eType )
The case we are interested in is
case ::dbaccess::DST_MSACCESS:
There, you need to get no only a .mdb filename, but also the discussed
workgroup file, which has extension .mdw.
You may also need to adapt
ODbDataSourceAdministrationHelper::getConnectionURL() in file DbAdminImpl.cxx,
as well as ODbTypeWizDialog::determineNextState in file dbwiz to activate a new
state ADDITIONAL_PAGE_MSACCESS, which you have to create first.
Finally, the dialog itself is in file dbaccess/source/ui/dlg/dbadminsetup.src,
section TabPage PAGE_DBWIZARD_MSACCESS.
You need to stick the path to the chosen workgroup (.mdw) file into the
constructed ADO URL as ";Jet OLEDB:System database=THE_PATH". Have a look at
sw/source/ui/dbui/dbmgr.cxx, function SwNewDBMgr::LoadAndRegisterDataSource.
You may also need to adapt ODsnTypeCollection::extractHostNamePort in file
dbaccess/source/core/misc/dsntypes.cxx so that it copes with (ignores) this
extra bit.
Make sure you start from a code checkout of 24 november 2011 or later, as ADO
is completely broken in older versions.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs