Re: Access and database connection

From: Jos (josnospambranders_at_fastmail.fm)
Date: 07/28/03


Date: Mon, 28 Jul 2003 15:06:06 +0200


chris wrote:
> I get the following error when I try to run my web page in
> asp.net.
>
> The Microsoft Jet database engine cannot open the
> file 'c:\inetpub\wwwroot\test\test.mdb'. It is already
> opened exclusively by another user, or you need permission
> to view its data.
>
> I have gone to the User Accounts and changed all users to
> group Administrators, but still does not work. I am using
> visual studio.net, and I seem to remember changing
> permissions on a file and it seemed to work after that but
> can not remember what or where that file is located. If
> anyone can help me with this error I would be most
> appreciative.
>
> chris

This problem can have 2 causes (as indicated by the message):

1) opened by another user. This can be caused by your own
   application opening the database and not closing it. Make
   sure to add the line myConnection.Close() after opening a
   connection. Also use exception handling, so that the
   this line also executes in the case of an error.

2) you need permission. Try changing the security settings on
    the database file test.mdb, by giving the ASPNET account
    at least read access.

--
Jos


Relevant Pages

  • Re: Security Warnings
    ... they are the digital signature warnings you receive when opening ... "Chris Mills" wrote: ... >> I have created a runtime access database using office 2003. ... >> dont get these warnings/questions. ...
    (microsoft.public.access.security)
  • Re: code access security
    ... Error 1 CREATE ASSEMBLY for assembly 'GmsSqlClr' failed because assembly ... owner has EXTERNAL ACCESS ASSEMBLY permission and the database has the ... make sure the database owner is mapped to the correct login on ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: SQL CE 3.5 and Data Loss on SD Card
    ... with a database on SD card I would be greatful. ... devices we have experienced only one corrupted SDF database. ... I attribute our success to opening a connection just before every DB access ...
    (microsoft.public.sqlserver.ce)
  • Re: Limitations using Developer
    ... Chris, thanks for the response. ... > The packaging wizard is just what you use to install it. ... >> packaging wizard once to get a database to a user who didn't ...
    (microsoft.public.access.devtoolkits)
  • Re: low permission cannot convert from A97 to A2000/2003
    ... Delete is a separate permission. ... You need open exclusive permission on the database to ... > The admin user has full privileges. ... > as we wont be importing those files from them, and the contractor will be ...
    (microsoft.public.access.conversion)

Quantcast