1

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?

Tony Toews
  • 7,850
  • 1
  • 22
  • 27
Senica Gonzalez
  • 7,996
  • 16
  • 66
  • 108

1 Answers1

0
  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.
cweiske
  • 30,033
  • 14
  • 133
  • 194