I upload the *.mdb file on my website and I need a simple PHP script to connect to that database.
The local connection was successful, but when I uploaded it, it doensn't work anymore, here's the code:
$db_conn = new COM("ADODB.Connection");
$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("./Database1.mdb").";";
$db_conn->open($connstr);
$rS = $db_conn->execute("SELECT * FROM Customers");
$f1 = $rS->Fields(0);
$f2 = $rS->Fields(1);
while (!$rS->EOF)
{
print $f1->value." ".$f2->value."
\n";
$rS->MoveNext();
}
$rS->Close();
$db_conn->Close();
?>