Hey everyone. I was hoping someone could help me understand something. Here's my situation. I've been creating a php web interface to a MS Access database via PHP's ODBC functions. On my testing server (Win2000) it's working fine. I just used the Windows control panel (odbcad32.exe) to define the .mdb file as a data source. I've been using a local copy of the .mdb file for testing.

Now, to get this thing live, I need to move it onto the linux server and point it to the real .mdb file. (Both the php files and the database files will be on the same linux box). I've read up a little on unixodbc. Is that what I need in order to define the real .mbd file (on the linux box) as a data source and give it a name (so I can hit it with my php app)? Is that the best option?

I've used MySQL a lot but I'm new to this ODBC stuff. I'd port the DB to MySQL if it were my call, but it's not. Other people will be hitting the .mdb file with Access to work with the database. My web interface is just a read-only, additional interface to the date.

Any help would be greatly appreciated.

Thanks,

Wheat
wheatdesign.com

    I investigated this, and unfortunately, the answer is no dice, for two reasons:

    1) If you just plop a .mdb file onto a Linux box, there is no database server. In Windows, the server is the Microsoft Data Engine (MSDE - or the Jet engine for older versions of Access), which is really a set of system libraries for reading and writing to the access files. The Access ODBC driver lets you use standard ODBC database functions to manipulate these databases.

    2) The Access file format is undocumented, so no non-Microsoft applications (AFAIK) can read and write to it directly.

    If you plan to deploy the database on a Linux box, I think the simplest thing to do would be to move the data into a MySQL or Postgres database, and run your PHP against that. If you still need the Access front end to connect to the database, you can do so quite nicely with the ODBC drivers for MySQL and Postgres respectively. I've actually used Access with MySQL this way, and it works quite well.

      Write a Reply...