Objectmix
Tags Register Mark Forums Read

Permissions error trying to open MDB file with ODBC : PHP

This is a discussion on Permissions error trying to open MDB file with ODBC within the PHP forums in Programming Languages category; On Tue, 25 Mar 2008 15:22:55 +0100, "Richard" <root @ localhost> wrote: > >"Martin" <ironwoodcanyon @ gmail.com> wrote 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 ...


Object Mix > Programming Languages > PHP > Permissions error trying to open MDB file with ODBC

Reply

 

LinkBack Thread Tools
  #11  
Old 03-25-2008, 03:17 PM
Junior Member
 
Join Date: Nov 2009
Posts: 0
Application Development is on a distinguished road
Default Re: Permissions error trying to open MDB file with ODBC

On Tue, 25 Mar 2008 15:22:55 +0100, "Richard" <root@localhost> wrote:

>
>"Martin" <ironwoodcanyon@gmail.com> wrote 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.
>>

>
>Hi again,
>
>did you check here:
>
>http://nl3.php.net/manual/en/function.odbc-connect.php
>
>It has some remarks on this.
>
>R.
>


Hi Richard -

Yes, I had checked that resource before but found very little of use
in it. One of the more recent links cited in it (to PHPFreaks) is
broken; and some searching around the PHPFreaks site lead nowhere.

Regarding your specific question about the connection string I'm
using: what I showed in the newsgroup post is actually the *output* of
the PHP variable that I'm using (as opposed to the actual characters
assigned inside the PHP script). As part of trying to de-bug this
whole mess, I was displaying (echoing) several of my variables to the
resulting page so I could see exactly what was going on; one of those
I simply quoted over to the post.

For now, I think I'm going to just give up on trying to get this to
work. This whole effort is more in the realm of "R & D" for me. Like I
said, I have it working when the files are on the local computer. I
would *like* to be able to get it to work when I split things up
between two computers but it looks like I may have to re-design the
whole architecture to achieve that.

Thanks for your input on this - it's greatly appreciated.

Martin

Reply With Quote
Reply

Thread Tools



All times are GMT -5. The time now is 01:54 PM.