Hi Matthias, >>If you desire the "data source" to be a registered data source, well, >>then you must run a script to register each base document. > > You say "script", does that mean there is a command line tool or > options to call soffice with that will do that? Or do you mean I'll > have to write a program that uses "com.sun.star.sdb.DatabaseContext" > to register the datasource? > What about the problem of multi-user machines for which we do not know > in advance who will use them. Is there a way to register datasources > in a shared way, so that all users on the machine will see them?
Database registrations are part of OOo's configuration. The configuration in general is layered, with the two most interesting layers being the shared layer - located in <installation>/share/registry - and the user layer - located in <userdata>/user/registry. The former is, well, /shared/ by all users working with this installation, the latter is user-dependent. (There can be more layers, for instance it would be possible to add additional layers between the two mentioned above, but I think this is not necessary/useful here.) What you could do is add the registration information to the shared layer of your installation (on your multi-user-machine(s)). That can be done manually, by tampering with the respective registration files: Look in share/registry/data/org/openoffice/Office/DataAccess.xcu, search for "RegisteredNames" - you'll find the pre-registered Bibliography, which can serve as a template. Alternatively, it can be done by running a macro. There's an API for accessing the configuration: [1] works the user layer, [2] can be used to programmatically write into the shared layer. So, I think what you want to do is to write some script (running internal or external to OOo, as you prefer), which on each installation adds a database registration to the shared layer. Ciao Frank [1]http://api.openoffice.org/docs/common/ref/com/sun/star/configuration/ConfigurationProvider.html [2]http://api.openoffice.org/docs/common/ref/com/sun/star/configuration/AdministrationProvider.html -- - Frank Schönheit, Software Engineer [EMAIL PROTECTED] - - Sun Microsystems http://www.sun.com/staroffice - - OpenOffice.org Database http://dba.openoffice.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
