https://bugs.freedesktop.org/show_bug.cgi?id=61972
Priority: medium
Bug ID: 61972
Assignee: [email protected]
Summary: FILEOPEN: ENHANCEMENT - Support reference to document
directory for back end database location
Severity: enhancement
Classification: Unclassified
OS: All
Reporter: [email protected]
Hardware: All
Status: UNCONFIRMED
Version: unspecified
Component: Database
Product: LibreOffice
BACKGROUND:
Whenever Base is attached to an external database, the exact path of the
external database file must be specified. Because this is likely to be unique
to the filesystem structure on each user's hard drive, it makes it difficult to
distribute split databases to other potential users. Each end user must be
educated enough to edit the Base document's connection settings to connect to
the back end database.
I propose a mechanism where the current Base document's directory could be
specified as the location of the back-end database. This way as long as a
back-end database file and the front end Base document file are kept together,
there won't be any need for end users to edit connection settings, no matter
what the filesystem structure is or if the files are later moved.
IMPLEMENTATION:
I propose two implementations depending on whether the back-end database is
directly supported by Base (MS Access, MS Access 2007, Spreadsheet, dBase), or
if it's based on a connection string like ADO, ODBC, and JDBC.
For file-based external back-end databases that are supported directly by LO(MS
Access, MS Access 2007, Spreadsheet, dBase), you specify where the back-end
database file is using a standard file requester dialog. I propose that after
the user clicks "Ok" on this, that LO Base should detect if the selected file
is in the same directory as the current document. If it is, then have Base
automatically add an internal flag to the Base document that tells Base to , in
the future, always look for the database file first in the Base document's
directory. The full path of the database file will still be stored, so that in
the future if the user moves the Base document but not the back-end database
file, then Base can still look there for it.
For connection-string based back-end databases (ADO, ODBC, JDBC), I propose
supporting an environment-variable-like macro expansion in the connection
string where, for example, %DOCUDIR% expands to be the full patch directory of
the current Base document. Thus, a JDBC connection string could be:
"jdbc:sqlite:%DOCUDIR%/database.db"
--
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