Hello people, an extension may want to ship (embedded) database files (ODB) with it, to integrate it in the Office modules (DataSourceBrowser == pressing F4), or simply to load it to the user in some circumstances, or just use it internally.
Besides generating the base at runtime, there are mainly two options: * registering in the installation the databases using the *DataAccess* *configuration* * storing the path to the ODB files in the *addon* *configuration* (the registration here can be done at runtime) The PROS of the first option is that it can be integrated in OOo modules automatically during the extension installation; some CONS: the user can change its registration name, can unregister it, no localization is possible. The most important benefit of storing the path to the ODB files in the add-on configuration is the *localization*: in some cases, an extension may want to ship different versions of the database for different languages; this can be achieved because the extension developer can design his/her add-on configuration schema in order to have localized values (setting the attribute oor:localized to "true"). The following demo extension http://www.arielconstenlahaile.com.ar/ooo/temp/DatabaseSamplesPackage.oxt [ sources as a NetBeans IDE project available : http://www.arielconstenlahaile.com.ar/ooo/temp/DatabaseSamplesPackage.zip ] shows how to achieve these two options, it's up to the developer to choose the one that fits his/her needs. [My personal opinion is that the DataAccess configuration should be used to register databases only in those cases where there's no other solution, and use the add-on configuration letting the user decide to register the database or not]. The extension will register two databases, add a menu on the main application menu bar, and from it dispatch to open two databases, and a third one will depend on the language configuration (default, Castellano, Deutsch). Remove the extension after testing it will unregister the data sources and delete the menu. As usual, your feedback is welcome :-) Have fun, Ariel. -- Ariel Constenla-Haile La Plata, Argentina [EMAIL PROTECTED] [EMAIL PROTECTED] http://www.arielconstenlahaile.com.ar/ooo/ "Aus der Kriegsschule des Lebens - Was mich nicht umbringt, macht mich härter." Nietzsche Götzendämmerung, Sprüche und Pfeile, 8. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]