PHP ODBC MDB Access on a Cloud Server
Hopefully quick question....
I have a .MDB file stored on my webse开发者_JAVA技巧rver and I'm trying to connect to it. I have no way of "registering" it with a name in ODBC.
Is the only way to connect to it by specifying the absolute page of the .mdb file?
$mdbFilename = "./db/Scora.mdb"; $connection = odbc_connect("Driver={Microsoft Access Driver (*.mdb)};Dbq=$mdbFilename","","");
if (!$connection) { echo "Couldn't make a connection!"; }
$sql = "SELECT ID FROM ScoraRegistrations"; $sql_result = odbc_prepare($connection,$sql); odbc_execute($sql_result); odbc_result_all($sql_result,"border=1"); odbc_free_result($sql_result); odbc_close($connection);
It never connects.
Any thoughts?
- try an absolute filename.
- see if the mdb driver is installed on your server. If it's a unix server, chances are ... low.
精彩评论