Re: Permissions error trying to open MDB file with ODBC




"Martin" <ironwoodcanyon@xxxxxxxxx> wrote in message
news:ng58u3pvpr12mtog8rbbtm1j6aiikam222@xxxxxxxxxx
On Fri, 21 Mar 2008 20:43:26 +0100, "Richard" <root@localhost>
wrote:


"Martin" <ironwoodcanyon@xxxxxxxxx> wrote in message
news:1qh7u393m3e0e3h04o2q9d8gcc5038ollm@xxxxxxxxxx
Using ODBC in a PHP script, I'm trying to read an MS Access MDB
file
that resides on another computer on my LAN. I'm getting the error:

Warning: odbc_connect() [function.odbc-connect]: 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 ...

The file is NOT already opened exclusively (or in any other
manner)
by
another user.

I have set every "permission" that I can think of to allow access
to
the MDB file.

I have set the sharing/security on the folder where the MDB file
is
to
allow "everyone" full control.

One thing that showed up on a Google search taked about setting
the
"default open mode" in the database itself to "shared". I've done
that
- it made no difference.

Another thread I found dealt with this exact same problem but the
issue was never resolved - the guy said he was going to give up
and
move the MDB file to the server!

Surely there must be a way around this.

If it matters, I'm using PHP 5.2. I've tried it on two different
server set-ups: one with WinXP Pro using IIS and the other Win2K
using
Apache. In both cases, the MDB file is on a computer running WinXP
Pro.

Any suggestions will be greatly appreciated.

Thanks.


Do you use an UNC path or a mapped drive?
I found it only owrked with one of them, dont remember which one
though...

R.

Using UNC. But I tried it with a mapped drive with the same result.

What I have not tried is a DSN; I really don't want to do it that
way
but, I suppose if I don't have a choice then I'll have to go that
route.

I would personally try anything to get something that works, and then
go from there.
Does it work ok when the db is local?
Do you use a DSN-less connection with a connection string?
Try the DSN way, first local, then remote.

oh... BTW:

engine cannot open the file '(unknown)'.

this looks strange. Are you sure you specify the correct path?
What is your connection string anyway?

R.


.



Relevant Pages

  • Re: Permissions error trying to open MDB file with ODBC
    ... I have set the sharing/security on the folder where the MDB file ... one with WinXP Pro using IIS and the other Win2K ... Do you use an UNC path or a mapped drive? ... What I have not tried is a DSN; I really don't want to do it that ...
    (comp.lang.php)
  • Re: Permissions error trying to open MDB file with ODBC
    ... I have set the sharing/security on the folder where the MDB file ... Do you use an UNC path or a mapped drive? ... What I have not tried is a DSN; I really don't want to do it that ... Are you sure you specify the correct path? ...
    (comp.lang.php)
  • Re: (Leo) ADO Connection Error
    ... - You probably know this one, specifies ... If you were using user-level security instead of or ... I have an Access mdb file with exclusive file password. ... Is there a difference between the connection string password and ...
    (microsoft.public.access.externaldata)
  • Re: Problem accessing Access/Jet databse: Could not lock file
    ... not lock file" when opening a connection to an Access database on a network ... shared folder. ... Since the .mdb file can be opened using Access and everything can be done, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: (Leo) ADO Connection Error
    ... The database password is separate and distinct from any user-level password ... I have an Access mdb file with exclusive file password. ... Dim cn As New ADODB.Connection ... Is there a difference between the connection string password and mdb ...
    (microsoft.public.access.externaldata)