Connecting Tech Pros Worldwide Forums | Help | Site Map

Permissions error trying to open MDB file with ODBC

Martin
Guest
 
Posts: n/a
#1: Mar 21 '08
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.


Jerry Stuckle
Guest
 
Posts: n/a
#2: Mar 21 '08

re: Permissions error trying to open MDB file with ODBC


Martin wrote:
Quote:
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.
jstucklex@attglobal.net
==================

Martin
Guest
 
Posts: n/a
#3: Mar 21 '08

re: Permissions error trying to open MDB file with ODBC


On Fri, 21 Mar 2008 12:54:42 -0500, Jerry Stuckle
<jstucklex@attglobal.netwrote:
Quote:
>Martin wrote:
Quote:
>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.
Richard
Guest
 
Posts: n/a
#4: Mar 21 '08

re: Permissions error trying to open MDB file with ODBC



"Martin" <ironwoodcanyon@gmail.comwrote in message
news:1qh7u393m3e0e3h04o2q9d8gcc5038ollm@4ax.com...
Quote:
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.


Martin
Guest
 
Posts: n/a
#5: Mar 21 '08

re: Permissions error trying to open MDB file with ODBC


On Fri, 21 Mar 2008 20:43:26 +0100, "Richard" <root@localhostwrote:
Quote:
>
>"Martin" <ironwoodcanyon@gmail.comwrote in message
>news:1qh7u393m3e0e3h04o2q9d8gcc5038ollm@4ax.com.. .
Quote:
>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.


Richard
Guest
 
Posts: n/a
#6: Mar 22 '08

re: Permissions error trying to open MDB file with ODBC



"Martin" <ironwoodcanyon@gmail.comwrote in message
news:ng58u3pvpr12mtog8rbbtm1j6aiikam222@4ax.com...
Quote:
On Fri, 21 Mar 2008 20:43:26 +0100, "Richard" <root@localhost>
wrote:
>
Quote:
>>
>>"Martin" <ironwoodcanyon@gmail.comwrote in message
>>news:1qh7u393m3e0e3h04o2q9d8gcc5038ollm@4ax.com. ..
Quote:
>>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:
Quote:
Quote:
Quote:
>>engine cannot open the file '(unknown)'.
this looks strange. Are you sure you specify the correct path?
What is your connection string anyway?

R.


Martin
Guest
 
Posts: n/a
#7: Mar 22 '08

re: Permissions error trying to open MDB file with ODBC


On Sat, 22 Mar 2008 03:06:20 +0100, "Richard" <root@localhostwrote:
Quote:
>
>"Martin" <ironwoodcanyon@gmail.comwrote in message
>news:ng58u3pvpr12mtog8rbbtm1j6aiikam222@4ax.com.. .
Quote:
>On Fri, 21 Mar 2008 20:43:26 +0100, "Richard" <root@localhost>
>wrote:
>>
Quote:
>>>
>>>"Martin" <ironwoodcanyon@gmail.comwrote in message
>>>news:1qh7u393m3e0e3h04o2q9d8gcc5038ollm@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.
Quote:
>Do you use a DSN-less connection with a connection string?
Yes.
Quote:
>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)
Quote:
>oh... BTW:
>
Quote:
Quote:
>>>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.
Quote:
>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.

Richard
Guest
 
Posts: n/a
#8: Mar 24 '08

re: Permissions error trying to open MDB file with ODBC


Hi again,

did you check here:

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

It has some remarks on this.

R.


Richard
Guest
 
Posts: n/a
#9: Mar 24 '08

re: Permissions error trying to open MDB file with ODBC



"Martin" <ironwoodcanyon@gmail.comwrote in message
news:f6uau35ma0et1ahbm54sod9jukgqk6lkqv@4ax.com...
Quote:
On Sat, 22 Mar 2008 03:06:20 +0100, "Richard" <root@localhost>
wrote:
>
Quote:
>>
>>"Martin" <ironwoodcanyon@gmail.comwrote in message
>>news:ng58u3pvpr12mtog8rbbtm1j6aiikam222@4ax.com. ..
Quote:
>>On Fri, 21 Mar 2008 20:43:26 +0100, "Richard" <root@localhost>
>>wrote:
>>>
>>>>
>>>>"Martin" <ironwoodcanyon@gmail.comwrote in message
>>>>news:1qh7u393m3e0e3h04o2q9d8gcc5038ollm@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.
>
Quote:
>>Do you use a DSN-less connection with a connection string?
>
Yes.
>
Quote:
>>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)
>
Quote:
>>oh... BTW:
>>
Quote:
>>>>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.
>
Quote:
>>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.


Richard
Guest
 
Posts: n/a
#10: Mar 25 '08

re: Permissions error trying to open MDB file with ODBC



"Martin" <ironwoodcanyon@gmail.comwrote in message
news:1qh7u393m3e0e3h04o2q9d8gcc5038ollm@4ax.com...
Quote:
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.



Closed Thread


Similar PHP bytes