views:

189

answers:

3

Ideally it would be brilliant if I could upload an .mdb file to a linux webserver and query it using php. Is this possible? If so how?

A: 

This question and answer may be of interest: http://stackoverflow.com/questions/1605473/how-to-operate-access-with-php

Remou
+1  A: 

Yes, you need to have ODBC drivers for Unix installed, or a better way would probably be to use PDO with php5.

*Stolen from elsewhere on the net, not tested.

try {
    $dbh = new PDO("odbc:Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\accounts.mdb;Uid=Admin");
    }
catch (PDOException $e)
    {
    echo $e->getMessage();
    }
Jeremy Morgan
+1  A: 

it looks like it is possible using mdbtools (in the repository), which should allow odbc access as well as a way to port to a different database.

Even if you can't use it directly, porting is an option.

chills42