How to Connect *.odb with PHP

Discuss the database features
Post Reply
virus
Posts: 1
Joined: Wed Dec 12, 2007 8:43 am

How to Connect *.odb with PHP

Post by virus »

Hi! everybody

I use openoffice base. so I cannot connect database with php.
If you known. please tell me. please.

from
student in thailand
TerryE
Volunteer
Posts: 1402
Joined: Sat Oct 06, 2007 10:13 pm
Location: UK

Re: How to Connect *.odb with PHP

Post by TerryE »

Hummm, you ask an interesting question. DrewJensen is probably the guy to answer this. The D/B engine which power base is the java based HSQLDB product. However, unlike databases such as MySQL or even Microsoft's Access, does not store the database in some storage and access efficient file format. Base, like all OOo components stores its database in ODF document format which is basically a ZIP compressed XML format which is loaded into memory on opening. With modern system memories and small (say less than 100Mbyte) this isn't to much of a burden for single user databases.

However, to my knowledge what this also means is that there is isn't an ODBC or JDBC connector which can be programmatically exposed to php through a DBI interface. The nearest is that the Base presents an UNO interface which can be accessed through COM or .NET on Windows PCs. I'll be talking to Drew later today. I'll ask him to comment.

PS. Just of the 'phone to Drew, the standalone UNO engine for Base is still FutureWare. You can still start up Soffice headless and talk through its UNO interface, but this begs a question: in what context are you planning to use php over Base? If you are using it over Apache or IIS then Base is just the wrong product to use. Even MS is withdrawing support for the Jet (Access) engine in this context. You should by using MySQL, PosgreSQL or MsSQL. If you are simply using it as a batch engine then you are better running as script inside the Soffice engine, using Java, Beans or python than php.
Ubuntu 11.04-x64 + LibreOffice 3 and MS free except the boss's Notebook which runs XP + OOo 3.3.
Post Reply