When making a connection to a database in Base, only one connection can be made per Base .odb file. It would be useful if *multiple* connections to be made, eg to allow the tables from 3 or 4 'external' databases to show in the 'Tables' pane, so that queries (and reports) joining data from tables of multiple databases could be made.
If you connect to an external database-server and there is more than one database you have the right to read and write data, you could do this in all the databases. I will upload a screenshot for this behavior. There are 4 different databases to see and also the system-databases from a mariadb. Connection is the native connection to the server and the name of the database I have written down in the connection is only "haushalt". If I do the same as another user, which has only rights to this specific database, only "haushalt" and "information_schema" will be shown.
Created attachment 167309 [details] Screenshot of connection to 4 databases See the different databases: "haushalt", "libretest", "physik" and "test"
(In reply to Robert Großkopf from comment #2) > Created attachment 167309 [details] > Screenshot of connection to 4 databases > > See the different databases: "haushalt", "libretest", "physik" and "test" Of course this method allows to connect to different databases on the same server. But what if we had say a remote MySQL server with a database and some data, and another (remote or local) completely different data source eg HSQL or ODBC database that had other data we wanted to query; at present, I cannot see that it's possible to connect to two *completely* separate data sources within the same .odb file.
(In reply to LibreOffice fan user from comment #3) > But what if we had say a remote MySQL server with a database and > some data, and another (remote or local) completely different data source eg > HSQL or ODBC database that had other data we wanted to query; at present, I > cannot see that it's possible to connect to two *completely* separate data > sources within the same .odb file. The first problem would be: The *.odb-file could only connect to one source. You could connect to a different source through Basic macro: DIM oDatabaseContext AS OBJECT DIM oDatasource AS OBJECT DIM oConnection AS OBJECT oDatabaseContext = createUnoService("com.sun.star.sdb.DatabaseContext") oDatasource = oDatabaseContext.getByName("Name of database on LO" or "file:///database.odb") oConnection = oDatasource.GetConnection("","") ... but every source needs an *.odb-file to create the connection. You couldn't connect with the same driver to MariaDB and PostgreSQL, for example. You have to choose different drivers and this is what the *.odb-file does. Queries over more than one database engine will only work in SQL-standard. So if you connect through macro you have to know much more about the different databases to get the right result. I don't know if there is any GUI which allows to connect to different database engines in one surface.
(In reply to Robert Großkopf from comment #4) > I don't know if there is any GUI which allows to connect to different > database engines in one surface. The concept of a federated database has been around since the 1980's, if I can believe wikipedia. I do not know of any libre (or even merely gratis) project providing database federation services. I think it would be a really big job, something more suitable for a project of its own rather than something to do within LibreOffice. IIRC, Brian Bruns has expressed an interest in getting such a project going.
*** Bug 141132 has been marked as a duplicate of this bug. ***
I think this shouldn't be so difficult. In fact, from Calc you can add many dinamic tables (from different ODBC sources). After that, if you create a new .odb you can use as source the .ods and then make querys with its dinamic tables. Unfortunately, theese dinamic tables are read-only ( I think, I'm just beginning now with LibreOffice). So, it would be "so easy" as deploying into Base the feature Calc has.
(In reply to Aprendiz from comment #7) > I think this shouldn't be so difficult. In fact, from Calc you can add many > dinamic tables (from different ODBC sources). 1. Calc tables are write protected. You could only use this solution for getting content from different sources for queries. 2. Queries with Calc could only contain one table as source. So you couldn't connect different tables to get results from different sources. Multiple databases as source for queries and forms might be something people would need. So this is a valid enhancement request. Let us put this bug to NEW.