Page 1 of 1

Base as ODBC source

Posted: Tue Dec 11, 2007 4:32 pm
by tosiara
Is there available an Base ODBC driver?

I would like to create an ODBC data source and maintain data in Base table.

Re: Base as ODBC source

Posted: Tue Dec 11, 2007 4:38 pm
by QuazzieEvil
to my knowledge you can not. only ODBC--> Base; not Base-->ODBC

Re: Base as ODBC source

Posted: Tue Dec 11, 2007 4:47 pm
by tosiara
A little update

Is there any API to get data from Base table (JDBC,ODBC,OLEDB....)????

Re: Base as ODBC source

Posted: Tue Dec 11, 2007 4:59 pm
by r4zoli
Only way, If you could write a code to extract HSQL database from odb file you could connect to HSQL JDBC driver in memory, after closing, repack it right.
I never tried.
You could find some code:
http://digiassn.blogspot.com/2006/07/ja ... on-to.html

Re: Base as ODBC source

Posted: Tue Dec 11, 2007 5:03 pm
by DrewJensen
There is no such interface for an embedded Base database. There is the API within OpenOffice.org that can be called from another programming language of course, but no such ODBC or OLEDB style driver.

If interoperability of this type is required however you can simply use an external data storage engine for your Base database, and then access this using which ever platform is appropriate, when appropriate.

Re: Base as ODBC source

Posted: Tue Oct 13, 2009 11:35 pm
by coolblueice
Hi Everyone,

I see the last post to this thread was back in late 2007... about two years ago. One never knows how much things might change in that time, so I thought I would ask the question again...

That is, has anyone yet developed an ODBC driver so that Base can itself function as an ODBC source? It seems to me a DB is truly useful only if it's data is/are available to outside front-end software. Don't get me wrong... I'm not being the least bit critical. I'd write a driver myself were I not a complete dummy. :lol:

Rather I am just wondering if someone has yet developed a driver for this great DB product.

Many thanks to all who read/respond. :super:

RJ

Re: Base as ODBC source

Posted: Tue Oct 13, 2009 11:51 pm
by Villeroy
Rather I am just wondering if someone has yet developed a driver for this great DB product.
I bet you do not use Base. It is far from being a "great DB product". It is not even a database on its own right. Base is a bridge between databases and office documents.
http://hsqldb.org is the type of database which can be wrapped into a "base document" which is hardly more than XML-configuration in a zip-archive. http://hsqldb.org is accessible via JDBC rather than ODBC.

Re: Base as ODBC source

Posted: Tue Oct 13, 2009 11:52 pm
by TheGurkha
I think you'd be better off using Base as a front end (which is all it is) to another database such as MySQL (which already supports ODBC).

The actual database engine that gets bundeled with OOo is HSQLDB, and the 'databases' it creates are all OOo documents with the data etc inside them. So I think it is HSQLDB that would need to support ODBC, which is (apparently) in development by the HSQLDB guys.

Re: Base as ODBC source

Posted: Wed Oct 14, 2009 8:58 am
by coolblueice
Thanks TheGurkha for that clarification. I went to the link you provided at http://hsqldb.org/ and did some reading. I think you are right in that any hope of finding an ODBC driver (more likely JDBC) would be found there.

Thanks again! :super:

RJ

Re: Base as ODBC source

Posted: Wed Oct 14, 2009 9:21 am
by r4zoli
No ODBC or JDBC driver for OOo Base odb file. No plans for creation such drivers.
OOo Base designed and remains single file, single user application.
OOo base can be applied to connect external data sources as Villeroy and TheGurka says.
Workaround: As described in link on my earlier post.
Open odb file with zipper, extract database script and data, start HSQLDB server, connect to HSQLDB with JDBC connection, manipulate data, stop server, save back script and all data into odb file.