By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,529 Members | 864 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,529 IT Pros & Developers. It's quick & easy.

Permissions error trying to open MDB file with ODBC

P: n/a
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.

Mar 21 '08 #1
Share this Question
Share on Google+
9 Replies


P: n/a
Martin wrote:
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.

This isn't a PHP problem - it's an ODBC one - it doesn't always handle
..mdb files on another server very well. You need an odbc or access
newsgroup or a different database. Personally, I would recommend the
latter.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Mar 21 '08 #2

P: n/a
On Fri, 21 Mar 2008 12:54:42 -0500, Jerry Stuckle
<js*******@attglobal.netwrote:
>Martin wrote:
>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.


This isn't a PHP problem - it's an ODBC one - it doesn't always handle
.mdb files on another server very well. You need an odbc or access
newsgroup or a different database. Personally, I would recommend the
latter.
Thanks Jerry.

I know it's not a PHP problem; I was just hoping someone here might
know how to fix it.

I'll see if I can find an ODBC newsgroup.
Mar 21 '08 #3

P: n/a

"Martin" <ir************@gmail.comwrote in message
news:1q********************************@4ax.com...
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.
Mar 21 '08 #4

P: n/a
On Fri, 21 Mar 2008 20:43:26 +0100, "Richard" <root@localhostwrote:
>
"Martin" <ir************@gmail.comwrote in message
news:1q********************************@4ax.com.. .
>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.
Mar 21 '08 #5

P: n/a

"Martin" <ir************@gmail.comwrote in message
news:ng********************************@4ax.com...
On Fri, 21 Mar 2008 20:43:26 +0100, "Richard" <root@localhost>
wrote:
>>
"Martin" <ir************@gmail.comwrote in message
news:1q********************************@4ax.com. ..
>>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.
Mar 22 '08 #6

P: n/a
On Sat, 22 Mar 2008 03:06:20 +0100, "Richard" <root@localhostwrote:
>
"Martin" <ir************@gmail.comwrote in message
news:ng********************************@4ax.com.. .
>On Fri, 21 Mar 2008 20:43:26 +0100, "Richard" <root@localhost>
wrote:
>>>
"Martin" <ir************@gmail.comwrote in message
news:1q********************************@4ax.com ...
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?
Yes.
>Do you use a DSN-less connection with a connection string?
Yes.
>Try the DSN way, first local, then remote.
Ok, I went back and did it this way but, no luck - I got the exact
same error message. FWIW, I set up a "System DSN" (as opposed to a
File DSN)
>oh... BTW:
>>>engine cannot open the file '(unknown)'.

this looks strange. Are you sure you specify the correct path?
I agree; I don't understand the "unknown" phrase either. Yes, I
believe the path is correct.
>What is your connection string anyway?
"Driver={Microsoft Access Driver (*.MDB)};
DBQ=\\Arizona\C\CCSSoftware\KVK.MDB"

"Arizona" is the name of the computer.
"C" is, of course, the drive (which is shared)
"CCSSoftware" is the folder (that is shared)
"KVK.MDB" is the data file.

Any additional thoughts anyone may have on this will be greatly
appreciated.

BTW, I posted this question in an ODBC newsgroup but have gotten no
response. There appears to be very little activity there.

Mar 22 '08 #7

P: n/a
Hi again,

did you check here:

http://nl3.php.net/manual/en/function.odbc-connect.php

It has some remarks on this.

R.
Mar 24 '08 #8

P: n/a

"Martin" <ir************@gmail.comwrote in message
news:f6********************************@4ax.com...
On Sat, 22 Mar 2008 03:06:20 +0100, "Richard" <root@localhost>
wrote:
>>
"Martin" <ir************@gmail.comwrote in message
news:ng********************************@4ax.com. ..
>>On Fri, 21 Mar 2008 20:43:26 +0100, "Richard" <root@localhost>
wrote:
"Martin" <ir************@gmail.comwrote in message
news:1q********************************@4ax.co m...
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?

Yes.
>>Do you use a DSN-less connection with a connection string?

Yes.
>>Try the DSN way, first local, then remote.

Ok, I went back and did it this way but, no luck - I got the exact
same error message. FWIW, I set up a "System DSN" (as opposed to a
File DSN)
>>oh... BTW:
>>>>engine cannot open the file '(unknown)'.

this looks strange. Are you sure you specify the correct path?

I agree; I don't understand the "unknown" phrase either. Yes, I
believe the path is correct.
>>What is your connection string anyway?
"Driver={Microsoft Access Driver (*.MDB)};
DBQ=\\Arizona\C\CCSSoftware\KVK.MDB"
Should this not be:
....
DBQ=\\\\Arizona\\C\\CCSSoftware\\KVK.MDB"

R.
Mar 24 '08 #9

P: n/a

"Martin" <ir************@gmail.comwrote in message
news:1q********************************@4ax.com...
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.
Hi again,

did you check here:

http://nl3.php.net/manual/en/function.odbc-connect.php

It has some remarks on this.

R.

Mar 25 '08 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Browse more PHP Questions on Bytes