Solved

Access 2007 opening exclusively by IIS.  Only able to open it readonly read only

Posted on 2009-05-10
5
276 Views
Last Modified: 2012-05-06
I am running a small ASP.Net application on a windows 2003 server running IIS.  

On my development machine (Vista Business) I used to develop the application I am able to simultaneously access the DB via both the ASP.Net web application hosted by the ASP.Net Development Server and MS Access.  So I am able to change values in the DB using access and see the change reflected on the web site.

When I deploy the application to the 2003 server it seems IIS opens the DB exclusively.  If I am running the web application then if I try to open the DB with MS Access I get message that the DB is opened in read only mode.

If I first open the DB in MS Access and then try and and use my web application I get the following error message from ASP.Net: Could not use 'C:\Inetpub\wwwroot\bbcintllc\WWD\App_Data\BBC_WWD.accdb'; file already in use.

Is there a configuration option to get IIS to open Access in a non-exclusive mode?  The connection string I am using is as follows:
<add name="WWWD_Access" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Inetpub\wwwroot\bbcintllc\WWD\App_Data\BBC_WWD.accdb"

            providerName="System.Data.OleDb" />

Open in new window

0
Comment
Question by:canuckconsulting
  • 2
  • 2
5 Comments
 
LVL 10

Expert Comment

by:Korbus
ID: 24350387
Just a short in the dark here:
Create an ODBC connection of your IIS server, and connect via that, rather than directly tothe file.
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 24350569
This sounds a lot like permissions issues. Are you sure that you've properly set the permissions on the Server to allow your ASP users at least Modify permissions on the server, along with whatever other users need this permission?
0
 

Author Comment

by:canuckconsulting
ID: 24352323
LSMConsulting

If I only connect one way or the other it works fine.  That is I am able to modify etc if I connect with just Access and similarly I have full control if I connect with just the web.  Could it still be a permissions issue if I have full control if I connect using just one of the tools?

Korbus:

I would like to avoid this if I could only because I would, I think, change all my oledb code to odbc.  Am I correct on this?
0
 
LVL 84
ID: 24353103
Yes, it could still be permissions. Access (actually, you're working with a Jet database) creates a lockfile when you open it; generally it will create that lockfile in the same folder as the database, but if you don't have sufficient permissions on that folder, the lockfile will be created somewhere else (generally on the workstation requesting the database). If this happens, other users either (a) wouldn't be able to open the db or (b) could open it readonly.
0
 

Author Comment

by:canuckconsulting
ID: 24358668
I made the anonymous user out to be an administrator but no luck.  I then went an extra step and did a search for the lock file and it was nowhere on the server.  I have tested and when you open a db exclusively no lock file is created so I am assuming that IIS is opening the DB exclusively.  

Any thoughts on how to talk it into being more friendly and share the db?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now