Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. OleDbException (exclusive access)

OleDbException (exclusive access)

Scheduled Pinned Locked Moved C#
csharpasp-netdatabasecomhelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Serge Lobko Lobanovsky
    wrote on last edited by
    #1

    I've got an ASP.NET application written in C# which uses an Access database. Sometimes, when several users try to access the application at the same time, a "file is opened exclusively by another user" exception is thrown. AFAIK, I need to synchronize access to the database. I've got a single place where all database access (like read a dataset, executenonquery) methods are. I tried using a ManualResetEvent to perform the task, but the problem is still there. Can anyone recommend an approach? Regards, Serge my blog on Easy Projects .NET and object-relational mapping

    M 1 Reply Last reply
    0
    • S Serge Lobko Lobanovsky

      I've got an ASP.NET application written in C# which uses an Access database. Sometimes, when several users try to access the application at the same time, a "file is opened exclusively by another user" exception is thrown. AFAIK, I need to synchronize access to the database. I've got a single place where all database access (like read a dataset, executenonquery) methods are. I tried using a ManualResetEvent to perform the task, but the problem is still there. Can anyone recommend an approach? Regards, Serge my blog on Easy Projects .NET and object-relational mapping

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      To handle multiple users, the Jet database engine has to be able to create a .ldb file (i.e. if your database is called MyDatabase.mdb, it has to create MyDatabase.ldb). Check that the user account your ASP.NET process runs under can create files in the same directory as the .mdb. If Windows 2000 or XP, by default it's ASPNET, while on Windows Server 2003 it's NETWORK SERVICE. Stability. What an interesting concept. -- Chris Maunder

      S 1 Reply Last reply
      0
      • M Mike Dimmick

        To handle multiple users, the Jet database engine has to be able to create a .ldb file (i.e. if your database is called MyDatabase.mdb, it has to create MyDatabase.ldb). Check that the user account your ASP.NET process runs under can create files in the same directory as the .mdb. If Windows 2000 or XP, by default it's ASPNET, while on Windows Server 2003 it's NETWORK SERVICE. Stability. What an interesting concept. -- Chris Maunder

        S Offline
        S Offline
        Serge Lobko Lobanovsky
        wrote on last edited by
        #3

        Thank you very much, Mike! I thought it was a sync problem :omg: Regards, Serge my blog on Easy Projects .NET and object-relational mapping

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups