Re: Help connecting to Access DB from web service



On Fri, 31 Mar 2006 17:13:37 -0800, "Jeff Richardson" <BobcatRidge@xxxxxxxxxxxxxxxxx> wrote:

¤ I am creating a web service that returns data from an Access 2000 database
¤ using VS2005. The Access database is located on a different server than
¤ where the web service is running. The Access database is also opened by a
¤ different desktop application running on various workstations on the
¤ network.
¤
¤ While developing / debugging the web service is hosted on my development
¤ machine using the 'ASP.NET Development Server' that is included with VS2005.
¤ When deployed it is being host with IIS.
¤
¤ I am using the following connection string:
¤
¤ Provider=Microsoft.Jet.OLEDB.4.0;Data Source="\\slo-science1\data\PBI Chem
¤ data\PBIChemDatabase.mdb"
¤
¤ If the database has NOT opened by any of the workstations running the
¤ desktop application then the web service runs correctly on both my
¤ development machine as well as on the IIS server.
¤
¤ If the database has been opened by any of the workstations running the
¤ desktop application the web service runs correctly ONLY on my development
¤ machine and fails on IIS with the following error:
¤
¤ System.Data.OleDb.OleDbException: Could not use ''; file already in use.
¤
¤ What are the differences between the 'ASP.NET Development Server' and IIS
¤ that would effect how a web service opens a remote Access database?
¤
¤ Does anyone know how what settings can be changed so that the web service
¤ runs correctly on IIS?

What the error is telling you is that there is a permissions problem with the remote resource. In
order to work with an Access database each user (or the ASPNET or NetworkService user if the app is
not configured for impersonation) must have full permissions to the resource where the database is
located. This is required to create, update and delete (after the database has been closed) the
corresponding .LDB file.


Paul
~~~~
Microsoft MVP (Visual Basic)
.



Relevant Pages

  • Re: ODBC Connection failing in Web service
    ... Forgot to mention that it is an Access database. ... > Well it's hard to tell what error is occuring to be honest with you! ... >> ¤ I have a class library that I am using to connect to an ODBC data ... If I consume it in an asp.net web service it ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Load Picture from MS Access to VB6
    ... in code to compact the database via a menu option. ... there is a chance the filename of the photo itself can ... > ¤ Well, I figured it out I think. ... loaded images into the database directly through Access (so that I could ...
    (microsoft.public.vb.general.discussion)
  • Re: ado.net create a table
    ... Thanks Paul, ... everything to a new access database and it worked like a charm. ... if i have tested in some other database, ... >> ¤ I am still struggling to get the solution. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Please Help Me in Visual Basic 6.0 SP6
    ... Dim dbPath As String ... Above is my programming where in this programming, ... how can i indicate myself which one i'm gonna insert to the database. ... > ¤ solution where as somebody can help me where to start. ...
    (microsoft.public.vb.database)
  • Re: Any reason why accessing Access should slowdown?
    ... On the MSACCESS / JET OLEDB front, you responded to a query I had about the ... Declared connection to Access database using string based on Jet OLDB ... Set up recordset filter in response to earlier input / selection ... ¤ I am writing a VB6 App using an Access database backend ...
    (microsoft.public.vb.database)