开发者

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?


  1. try an absolute filename.
  2. see if the mdb driver is installed on your server. If it's a unix server, chances are ... low.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜