PHP ODBC MDB Access on a Cloud Server

Posted by Senica Gonzalez on Stack Overflow See other posts from Stack Overflow or by Senica Gonzalez
Published on 2010-05-05T23:42:36Z Indexed on 2010/05/05 23:48 UTC
Read the original article Hit count: 625

Filed under:


Hopefully quick question....

I have a .MDB file stored on my webserver 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?

© Stack Overflow or respective owner

Related posts about php

Related posts about access