Connect to multiple datasources

Discuss the database features

Connect to multiple datasources

Postby jza » Tue Dec 15, 2009 7:46 pm

is it possible to connec tto multiple databases in JDBC/OOo?

I got a client that has a sistem that uses MSQuery (an excel subset of db connectivity) and pull info from different databases and dump it into Excel. I wonder if Calc can do the same, the main question is if the datasource can connect from different datasources.

I know I can register multiple datasources but I am not sure I can connect to them simultaneously, but then again I have never tried and wonder if anyone else here knows.
AOO 4.0 on Mandriva 2012
User avatar
jza
 
Posts: 185
Joined: Mon Nov 03, 2008 11:33 am
Location: Cancún, Mexico

Re: Connect to multiple datasources

Postby rudolfo » Tue Dec 15, 2009 9:14 pm

As far as I know MS Query is only a tool that binds a SQL query statement to an ODBC database connection. It can be used in MS Excel, but also in MS Access. Typically you use it in Excel to pull n x m table data from a data source into a spreadsheet.
The database connection is only used while the the data is extracted from the database. Depending on the amount of data this is mostly done in less than 2 or 3 seconds. (And even if it takes longer you will see the hourglass pointer and all further data input is blocked). In other words if you have 2 or 3 queries stored in the MS Query builder and you use them in MS Excel, they are actually used sequentially and not in parallel.
Right, at the end you will have the data from all the data sources in your spreadsheet (in parallel), but this is cached data.

You can do the same in Calc with some manually composed macros as in this other thread or there is also a more user friendly method to do this. I am not aware right now where I exactly saw this, but you might search in the Calc and Base forums for post with the keywords "insert from a database table".
OpenOffice 3.1.1 (2.4.3 until October 2009) and LibreOffice 3.3.2 on Windows 2000, AOO 3.4.1 on Windows 7
There are several macro languages in OOo, but none of them is called Visual Basic or VB(A)! Please call it OOo Basic, Star Basic or simply Basic.
rudolfo
Volunteer
 
Posts: 1415
Joined: Wed Mar 19, 2008 11:34 am
Location: Germany

Re: Connect to multiple datasources

Postby rudolfo » Tue Dec 15, 2009 9:36 pm

Okay,
I found what I had in mind: Open xls and keep ODBC query talks about the same problem ... and has a solution.
OpenOffice 3.1.1 (2.4.3 until October 2009) and LibreOffice 3.3.2 on Windows 2000, AOO 3.4.1 on Windows 7
There are several macro languages in OOo, but none of them is called Visual Basic or VB(A)! Please call it OOo Basic, Star Basic or simply Basic.
rudolfo
Volunteer
 
Posts: 1415
Joined: Wed Mar 19, 2008 11:34 am
Location: Germany


Return to Base

Who is online

Users browsing this forum: No registered users and 7 guests