Permissions error trying to open MDB file with ODBC

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Martin

    Permissions error trying to open MDB file with ODBC

    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

    #2
    Re: Permissions error trying to open MDB file with ODBC

    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.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • Martin

      #3
      Re: Permissions error trying to open MDB file with ODBC

      On Fri, 21 Mar 2008 12:54:42 -0500, Jerry Stuckle
      <jstucklex@attg lobal.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.

      Comment

      • Richard

        #4
        Re: Permissions error trying to open MDB file with ODBC


        "Martin" <ironwoodcanyon @gmail.comwrote in message
        news:1qh7u393m3 e0e3h04o2q9d8gc c5038ollm@4ax.c om...
        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.


        Comment

        • Martin

          #5
          Re: Permissions error trying to open MDB file with ODBC

          On Fri, 21 Mar 2008 20:43:26 +0100, "Richard" <root@localhost wrote:
          >
          >"Martin" <ironwoodcanyon @gmail.comwrote in message
          >news:1qh7u393m 3e0e3h04o2q9d8g cc5038ollm@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.


          Comment

          • Richard

            #6
            Re: Permissions error trying to open MDB file with ODBC


            "Martin" <ironwoodcanyon @gmail.comwrote in message
            news:ng58u3pvpr 12mtog8rbbtm1j6 aiikam222@4ax.c om...
            On Fri, 21 Mar 2008 20:43:26 +0100, "Richard" <root@localhost >
            wrote:
            >
            >>
            >>"Martin" <ironwoodcanyon @gmail.comwrote in message
            >>news:1qh7u393 m3e0e3h04o2q9d8 gcc5038ollm@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.


            Comment

            • Martin

              #7
              Re: Permissions error trying to open MDB file with ODBC

              On Sat, 22 Mar 2008 03:06:20 +0100, "Richard" <root@localhost wrote:
              >
              >"Martin" <ironwoodcanyon @gmail.comwrote in message
              >news:ng58u3pvp r12mtog8rbbtm1j 6aiikam222@4ax. com...
              >On Fri, 21 Mar 2008 20:43:26 +0100, "Richard" <root@localhost >
              >wrote:
              >>
              >>>
              >>>"Martin" <ironwoodcanyon @gmail.comwrote in message
              >>>news:1qh7u39 3m3e0e3h04o2q9d 8gcc5038ollm@4a x.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
              >>>exclusivel y 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={Micros oft Access Driver (*.MDB)};
              DBQ=\\Arizona\C \CCSSoftware\KV K.MDB"

              "Arizona" is the name of the computer.
              "C" is, of course, the drive (which is shared)
              "CCSSoftwar e" 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.

              Comment

              • Richard

                #8
                Re: Permissions error trying to open MDB file with ODBC

                Hi again,

                did you check here:



                It has some remarks on this.

                R.


                Comment

                • Richard

                  #9
                  Re: Permissions error trying to open MDB file with ODBC


                  "Martin" <ironwoodcanyon @gmail.comwrote in message
                  news:f6uau35ma0 et1ahbm54sod9ju kgqk6lkqv@4ax.c om...
                  On Sat, 22 Mar 2008 03:06:20 +0100, "Richard" <root@localhost >
                  wrote:
                  >
                  >>
                  >>"Martin" <ironwoodcanyon @gmail.comwrote in message
                  >>news:ng58u3pv pr12mtog8rbbtm1 j6aiikam222@4ax .com...
                  >>On Fri, 21 Mar 2008 20:43:26 +0100, "Richard" <root@localhost >
                  >>wrote:
                  >>>
                  >>>>
                  >>>>"Martin" <ironwoodcanyon @gmail.comwrote in message
                  >>>>news:1qh7u3 93m3e0e3h04o2q9 d8gcc5038ollm@4 ax.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
                  >>>>exclusive ly 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={Micros oft Access Driver (*.MDB)};
                  DBQ=\\Arizona\C \CCSSoftware\KV K.MDB"
                  Should this not be:
                  ....
                  DBQ=\\\\Arizona \\C\\CCSSoftwar e\\KVK.MDB"

                  R.


                  Comment

                  • Richard

                    #10
                    Re: Permissions error trying to open MDB file with ODBC


                    "Martin" <ironwoodcanyon @gmail.comwrote in message
                    news:1qh7u393m3 e0e3h04o2q9d8gc c5038ollm@4ax.c om...
                    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:



                    It has some remarks on this.

                    R.



                    Comment

                    Working...