I am trying to connect to a MS Access Database with PHP. It is working perfectly when I am creating a System DSN but how do I make the connection work, when I want to copy and use the PHP files plus Database on a different computer? (Without creating another System DSN on that computer as well)
At the moment I am trying it this way:
$conn = odbc_connect("odbc:DRIVER={Microosoft Access Driver (*.mdb)}; DBQ=$odbc_name; Uid=$Uid; Pwd=$Pwd;");
And I am getting this error:
Warning: odbc_connect() expects at least 3 parameters, 1 given in C:\wamp\www\PartB\db_connection.php on line 14
The file is correctly found with this line of code:
$odbc_name = $_SERVER["DOCUMENT_ROOT"] . "PartB\db.mdb";
So where is my problem? Why is this way not working, but System DSN is? Any ideas?