1

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?

Jenski
  • 1,458
  • 1
  • 18
  • 29

3 Answers3

1

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();
} 
Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
Jeremy Morgan
  • 3,314
  • 23
  • 23
1

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
  • 14,201
  • 3
  • 42
  • 77
  • The "porting is an option" link is dead. Do you have another one for that tool or another tool that works with MS-Access 2013 or newer? – Alexis Wilke Jul 12 '20 at 22:49
-1

This question and answer may be of interest: PHP and Microsoft Access database - Connection and CRUD

Community
  • 1
  • 1
Fionnuala
  • 90,370
  • 7
  • 114
  • 152