OleDB Connect string to remote Data

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • asemeiks@capitalpost.com

    OleDB Connect string to remote Data

    I'm using Access 97, Jet 4.0. the data resides on a Win 2000 domain server. Using .Net 1.1 and IIS 5.0 on a local
    XPPro computer I am trying connect to a Jet database on the server. If the data source is on the local computer I can
    connect ok. If it is is on the server I cannot connect and get the following error.

    'Error message.
    "The Microsoft Jet database engine cannot open the file ''.
    It is already opened exclusively by another user, or you need permission to view its data."

    'This Works.
    strC = "Provider=Micro soft.Jet.OLEDB. 4.0; "
    strC = strC & "Data Source=c:\test\ Contdat.mdb; "

    'This doesn't work. Exclusive error
    strC = "Provider=Micro soft.Jet.OLEDB. 4.0; "
    strC = strC & "Data Source=\\Server 01\NYAccess\Dat a\Contdat.mdb; "
    strC = strC & "Jet OLEDB:System database=\Serve r01\NYAccess\Sy stem.mdw; "
    strC = strC & "User ID=UserName; password=UserCo de"


    Apparently the problem is with the permissions within IIS or on the server.

    I am logged in as an administrator on the server and am using the same logon as the anonymous user account in IIS. This
    account has full rights on both the local computer and the server.

    I have installed Jet 4.0 Service pack 8 and MDAC 2.6 on the local computer without it helping.

    Anyone have any ideas how I can solve this problem?


    thanks,

    Andy
  • vendus@gmail.com

    #2
    Re: OleDB Connect string to remote Data

    are you missing a slash "\" before Server01 on the 3rd line

    should read: \\Server01\NYAc cess\System.mdw

    ?


    strC = strC & "Jet OLEDB:System database=\Serve r01\NYAccess\Sy stem.mdw;
    "


    aseme...@capita lpost.com wrote:[color=blue]
    > I'm using Access 97, Jet 4.0. the data resides on a Win 2000 domain server. Using .Net 1.1 and IIS 5.0 on a local
    > XPPro computer I am trying connect to a Jet database on the server. If the data source is on the local computer I can
    > connect ok. If it is is on the server I cannot connect and get the following error.
    >
    > 'Error message.
    > "The Microsoft Jet database engine cannot open the file ''.
    > It is already opened exclusively by another user, or you need permission to view its data."
    >
    > 'This Works.
    > strC = "Provider=Micro soft.Jet.OLEDB. 4.0; "
    > strC = strC & "Data Source=c:\test\ Contdat.mdb; "
    >
    > 'This doesn't work. Exclusive error
    > strC = "Provider=Micro soft.Jet.OLEDB. 4.0; "
    > strC = strC & "Data Source=\\Server 01\NYAccess\Dat a\Contdat.mdb; "
    > strC = strC & "Jet OLEDB:System database=\Serve r01\NYAccess\Sy stem.mdw; "
    > strC = strC & "User ID=UserName; password=UserCo de"
    >
    >
    > Apparently the problem is with the permissions within IIS or on the server.
    >
    > I am logged in as an administrator on the server and am using the same logon as the anonymous user account in IIS. This
    > account has full rights on both the local computer and the server.
    >
    > I have installed Jet 4.0 Service pack 8 and MDAC 2.6 on the local computer without it helping.
    >
    > Anyone have any ideas how I can solve this problem?
    >
    >
    > thanks,
    >
    > Andy[/color]

    Comment

    • asemeiks@capitalpost.com

      #3
      Re: OleDB Connect string to remote Data

      No, that's a typo from when I pasted into this posting and tried to format it. It also doesn't work if I use a mapped
      drive to the server.

      I think I've narrowed my problem to the configuarion in the machine.config file in the .net framework setup. I've about
      exhausted all other combinations of users and passwords on the local computer, server, and IIS.

      I haven't much looked onto the underpinnings of .Net. The machine.config file is massive and apparently it uses a built
      in userid whose access rights within Active Directory have to be sufficient to read the file. I haven't figured out how
      to do this yet. Technically this may not be an Access database question but a .Net question. Then again I may be
      totally off base here.

      Anyone else come across this problem?

      Andy


      On 15 Mar 2006 15:54:27 -0800, vendus@gmail.co m wrote:
      [color=blue]
      >are you missing a slash "\" before Server01 on the 3rd line
      >
      >should read: \\Server01\NYAc cess\System.mdw
      >
      >?
      >
      >
      >strC = strC & "Jet OLEDB:System database=\Serve r01\NYAccess\Sy stem.mdw;
      >"
      >
      >
      >aseme...@capit alpost.com wrote:[color=green]
      >> I'm using Access 97, Jet 4.0. the data resides on a Win 2000 domain server. Using .Net 1.1 and IIS 5.0 on a local
      >> XPPro computer I am trying connect to a Jet database on the server. If the data source is on the local computer I can
      >> connect ok. If it is is on the server I cannot connect and get the following error.
      >>
      >> 'Error message.
      >> "The Microsoft Jet database engine cannot open the file ''.
      >> It is already opened exclusively by another user, or you need permission to view its data."
      >>
      >> 'This Works.
      >> strC = "Provider=Micro soft.Jet.OLEDB. 4.0; "
      >> strC = strC & "Data Source=c:\test\ Contdat.mdb; "
      >>
      >> 'This doesn't work. Exclusive error
      >> strC = "Provider=Micro soft.Jet.OLEDB. 4.0; "
      >> strC = strC & "Data Source=\\Server 01\NYAccess\Dat a\Contdat.mdb; "
      >> strC = strC & "Jet OLEDB:System database=\Serve r01\NYAccess\Sy stem.mdw; "
      >> strC = strC & "User ID=UserName; password=UserCo de"
      >>
      >>
      >> Apparently the problem is with the permissions within IIS or on the server.
      >>
      >> I am logged in as an administrator on the server and am using the same logon as the anonymous user account in IIS. This
      >> account has full rights on both the local computer and the server.
      >>
      >> I have installed Jet 4.0 Service pack 8 and MDAC 2.6 on the local computer without it helping.
      >>
      >> Anyone have any ideas how I can solve this problem?
      >>
      >>
      >> thanks,
      >>
      >> Andy[/color]
      >[/color]

      Comment

      • asemeiks@capitalpost.com

        #4
        Re: OleDB Connect string to remote Data

        I solved my problem. It is not an Access database problem but is a .Net configuation problem.

        I had to change a value in the machine.config file in c:\windows\micr osoft.net\frame work\v1.1.4322\ config\machine. config

        The section reads as follows and defines how a logon user impersonates a windows user. The default had identity
        impersonate = "false" and did not work. Changing the value to "True" made it work. My IIS anonymous user is set to
        have directory and file rights to the .mdb on the server.

        Presumably this "True" value can also me passed from the connect string to override the default "false" in the
        machine.config file. I haven't experimented with this yet.

        <?--
        identity Attributes:
        impersonate="[true|false]" - Impersonate Windows User
        userName="Windo ws user account to impersonate" | empty string implies impersonate the LOGON user specified by IIS

        password="passw ord of above specified account" | empty string
        -->
        <identity impersonate="tr ue" userName="" password=""/>

        I hope this may be of use to someone.

        Andy



        On Wed, 15 Mar 2006 19:16:55 GMT, asemeiks@capita lpost.com wrote:
        [color=blue]
        >I'm using Access 97, Jet 4.0. the data resides on a Win 2000 domain server. Using .Net 1.1 and IIS 5.0 on a local
        >XPPro computer I am trying connect to a Jet database on the server. If the data source is on the local computer I can
        >connect ok. If it is is on the server I cannot connect and get the following error.
        >
        >'Error message.
        >"The Microsoft Jet database engine cannot open the file ''.
        >It is already opened exclusively by another user, or you need permission to view its data."
        >
        >'This Works.
        >strC = "Provider=Micro soft.Jet.OLEDB. 4.0; "
        >strC = strC & "Data Source=c:\test\ Contdat.mdb; "
        >
        >'This doesn't work. Exclusive error
        >strC = "Provider=Micro soft.Jet.OLEDB. 4.0; "
        >strC = strC & "Data Source=\\Server 01\NYAccess\Dat a\Contdat.mdb; "
        >strC = strC & "Jet OLEDB:System database=\Serve r01\NYAccess\Sy stem.mdw; "
        >strC = strC & "User ID=UserName; password=UserCo de"
        >
        >
        > Apparently the problem is with the permissions within IIS or on the server.
        >
        >I am logged in as an administrator on the server and am using the same logon as the anonymous user account in IIS. This
        >account has full rights on both the local computer and the server.
        >
        >I have installed Jet 4.0 Service pack 8 and MDAC 2.6 on the local computer without it helping.
        >
        >Anyone have any ideas how I can solve this problem?
        >
        >
        >thanks,
        >
        >Andy[/color]

        Comment

        Working...