Forgive my ignorance but i can not find how to connect to an Access 2000
(mdb) file through PHP if the file is on another computer in a lan (not on
same computer as Apache/PHP server) I have no problem connectig to an mdb
through ODBC and a valid DSN(system) for a local mdb file, but i get a
general error (see below) when the DSN points to a file through a mapped
drive "R:\file.mdb" or an actual path "\ \server\dir\dir\file.mdb"
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] The Microsoft
Jet database engine cannot open the file '(unknown)'. It is already opened
exclusively by another user, or you need permission to view its data., SQL
state S1000 in SQLConnect in c:\apache\htdocs\www\php\tmpa2w9rldsv.php on
line 1
I have no passwords on this file and its not being used exclusively by

Here is my PHP code:
<?php $connect = odbc_connect("IDS","","");

The "IDS" is of course a valid system DSN. I have used this DSN by Crystal
Reports with no problems. And i am not using the file when i do my PHP

There is no username or password in the DSN as i assume i do not need one. I
can only assume i have to pass some sort of authorization string with the
ODBC connect or i just cant do it this way. I've heard many things about
using IIS for the server but I am using Apache on Win2k and don't wish to
change. If it matters the file i need to access is on a Win NT 4 server but
its just a shared folder with the correct permissions.

Reply via email to