database - Connect to MS Access with PHP not working -



database - Connect to MS Access with PHP not working -

i trying connect ms access database php. working when creating scheme dsn how create connection work, when want re-create , utilize php files plus database on different computer? (without creating scheme dsn on computer well)

at moment trying way:

$conn = odbc_connect("odbc:driver={microosoft access driver (*.mdb)}; dbq=$odbc_name; uid=$uid; pwd=$pwd;");

and getting error:

warning: odbc_connect() expects @ to the lowest degree 3 parameters, 1 given in c:\wamp\www\partb\db_connection.php on line 14

the file correctly found line of code:

$odbc_name = $_server["document_root"] . "partb\db.mdb";

so problem? why way not working, scheme dsn is? ideas?

ok found reply myself.

$conn = "provider=microsoft.jet.oledb.4.0; info source=$odbc_name";

the above code makes connection work without scheme dsn.

now need reconfigure query statements , good.

php database ms-access

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -