Problem connecting to Access Database - "already opened exclusively by another user"

Discussion in 'ASP .Net' started by Tom Wild, Aug 25, 2003.

  1. Tom Wild

    Tom Wild Guest

    Hi

    I am trying to create a webform that connects to an Access database.

    If I use the connection string:
    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Gizmo\Gizmo.mdb"
    Then the application connects to the database and downloads data fine but
    when I try to fire an Update command I get the following error:
    "Problem firing System.Data.OleDb.OleDbCommand - Operation must use an
    updateable query"

    If I change the connection string to:
    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Gizmo\Gizmo.mdb;Mode=3"
    Then the application will not even connect to the database and I get the
    following error:
    "The Microsoft Jet database engine cannot open the file
    'C:\Gizmo\GizmoVIII.mdb'. It is already opened exclusively by another user,
    or you need permission to view its data"

    I have already gone into Computer Management and made the IUSR_TOMWILD user
    a member of Administrators but I am still getting the above errors.

    My questions are as follows:
    Am I correct in assuming that adding ";Mode=3" to the connection string is
    giving me write access to the database but that I don't have sufficient
    permissions to have this access?
    How do I get such access for my webform?
    I found an article in the Microsoft Knowledge Base which seems to address
    this problem http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q316675
    Unfortunately it suggests that I either "Configure the ASP.NET worker
    process to run under the SYSTEM account in the <processModel> section of the
    Machine.config file." or "enable impersonation on your ASP.NET application"
    and I don't know how to do either of these. Will either of these solve my
    problem and how do I do them?
    Other articles suggest that I need to ensure that the database directory and
    the database and my temp directory are all set so that IUSR_TOMWILD can
    read/write to them. How do I do this?

    Sorry for the extra-long question.

    Thanks

    Tom Wild
    Tom Wild, Aug 25, 2003
    #1
    1. Advertising

  2. Tom Wild

    Kevin Swarts Guest

    Make sure the Access file is not ReadOnly.

    KS
    http://www.nAlliance.com

    "Tom Wild" <> wrote in message
    news:...
    > Hi
    >
    > I am trying to create a webform that connects to an Access database.
    >
    > If I use the connection string:
    > "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Gizmo\Gizmo.mdb"
    > Then the application connects to the database and downloads data fine but
    > when I try to fire an Update command I get the following error:
    > "Problem firing System.Data.OleDb.OleDbCommand - Operation must use an
    > updateable query"
    >
    > If I change the connection string to:
    > "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Gizmo\Gizmo.mdb;Mode=3"
    > Then the application will not even connect to the database and I get the
    > following error:
    > "The Microsoft Jet database engine cannot open the file
    > 'C:\Gizmo\GizmoVIII.mdb'. It is already opened exclusively by another

    user,
    > or you need permission to view its data"
    >
    > I have already gone into Computer Management and made the IUSR_TOMWILD

    user
    > a member of Administrators but I am still getting the above errors.
    >
    > My questions are as follows:
    > Am I correct in assuming that adding ";Mode=3" to the connection string is
    > giving me write access to the database but that I don't have sufficient
    > permissions to have this access?
    > How do I get such access for my webform?
    > I found an article in the Microsoft Knowledge Base which seems to address
    > this problem

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q316675
    > Unfortunately it suggests that I either "Configure the ASP.NET worker
    > process to run under the SYSTEM account in the <processModel> section of

    the
    > Machine.config file." or "enable impersonation on your ASP.NET

    application"
    > and I don't know how to do either of these. Will either of these solve my
    > problem and how do I do them?
    > Other articles suggest that I need to ensure that the database directory

    and
    > the database and my temp directory are all set so that IUSR_TOMWILD can
    > read/write to them. How do I do this?
    >
    > Sorry for the extra-long question.
    >
    > Thanks
    >
    > Tom Wild
    >
    >
    >
    >
    Kevin Swarts, Aug 25, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tom Wild
    Replies:
    0
    Views:
    6,695
    Tom Wild
    Aug 14, 2003
  2. Bart Schelkens

    Connecting to an Access-database

    Bart Schelkens, Nov 19, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    407
    Bart Schelkens
    Nov 19, 2004
  3. Nathan Sokalski
    Replies:
    9
    Views:
    454
    Steve Long
    Jun 8, 2005
  4. ali
    Replies:
    2
    Views:
    361
  5. Krish
    Replies:
    3
    Views:
    625
    Phlip
    Oct 19, 2004
Loading...

Share This Page