473,486 Members | 1,950 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

MS Access OLEDB connection problem

RML
Hi,

I have an ASP.NET app which opens a MS Access database using the Het 4.0 OleDB provider. My development code abd database live on my D drive. Under .NET's Server Explorer I created a connection to the Access database and used this connection in my OleDBConnection object. When I run the app, all works fine.

I then moved the database to my C drive, created the new connection and used it in my app. When opening the database, the following error is generated...

File xxx.mdb is exclusivly opened by another user or, you do not have permission to view its data.

Anyone have any thoughts.

Mark
Nov 18 '05 #1
6 1671
You have a file system permission issue. The user account under which
ASP.Net is running on your machine will need Modify permission for the
folder containing your database.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"RML" <RM*@discussions.microsoft.com> wrote in message
news:A3**********************************@microsof t.com...
Hi,

I have an ASP.NET app which opens a MS Access database using the Het 4.0 OleDB provider. My development code abd database live on my D drive. Under
..NET's Server Explorer I created a connection to the Access database and
used this connection in my OleDBConnection object. When I run the app, all
works fine.
I then moved the database to my C drive, created the new connection and used it in my app. When opening the database, the following error is
generated...
File xxx.mdb is exclusivly opened by another user or, you do not have permission to view its data.
Anyone have any thoughts.

Mark

Nov 18 '05 #2
Hi Mark,

That error usually means that the ASPNET account (or whoever it is
impersonating) doesn't have sufficient permissions to write to the directory
where the .mdb file is located.

When you open an Access database - even for reading - Access needs to create
a locking file. When that can't be done, you get the error you've seen.

Let us know?

Ken
Microsoft MVP [ASP.NET]

"RML" <RM*@discussions.microsoft.com> wrote in message
news:A3**********************************@microsof t.com...
Hi,

I have an ASP.NET app which opens a MS Access database using the Het 4.0
OleDB provider. My development code abd database live on my D drive.
Under .NET's Server Explorer I created a connection to the Access
database and used this connection in my OleDBConnection object. When I
run the app, all works fine.

I then moved the database to my C drive, created the new connection and
used it in my app. When opening the database, the following error is
generated...

File xxx.mdb is exclusivly opened by another user or, you do not have
permission to view its data.

Anyone have any thoughts.

Mark


Nov 18 '05 #3
RML
Hi Ken, thanks for the info.

I gave "Everyone" and the "ASPNET" accounts Modify permissions on this mdb file, and now the error "Could not lock file" appears.

No one else is using it, and I can open it in Access with no problems.

Note: The mdb that opens fine (on my D drvie) has "Everyone" with Full Control.

Mark

"Ken Cox [Microsoft MVP]" wrote:
Hi Mark,

That error usually means that the ASPNET account (or whoever it is
impersonating) doesn't have sufficient permissions to write to the directory
where the .mdb file is located.

When you open an Access database - even for reading - Access needs to create
a locking file. When that can't be done, you get the error you've seen.

Let us know?

Ken
Microsoft MVP [ASP.NET]

"RML" <RM*@discussions.microsoft.com> wrote in message
news:A3**********************************@microsof t.com...
Hi,

I have an ASP.NET app which opens a MS Access database using the Het 4.0
OleDB provider. My development code abd database live on my D drive.
Under .NET's Server Explorer I created a connection to the Access
database and used this connection in my OleDBConnection object. When I
run the app, all works fine.

I then moved the database to my C drive, created the new connection and
used it in my app. When opening the database, the following error is
generated...

File xxx.mdb is exclusivly opened by another user or, you do not have
permission to view its data.

Anyone have any thoughts.

Mark


Nov 18 '05 #4
You need to give modify rights to the folder the .mdb file is in. Access
wants to create/write to the .ldb file in the same directory.

Greg

"RML" <RM*@discussions.microsoft.com> wrote in message
news:DE**********************************@microsof t.com...
Hi Ken, thanks for the info.

I gave "Everyone" and the "ASPNET" accounts Modify permissions on this mdb file, and now the error "Could not lock file" appears.
No one else is using it, and I can open it in Access with no problems.

Note: The mdb that opens fine (on my D drvie) has "Everyone" with Full Control.
Mark

"Ken Cox [Microsoft MVP]" wrote:
Hi Mark,

That error usually means that the ASPNET account (or whoever it is
impersonating) doesn't have sufficient permissions to write to the directory where the .mdb file is located.

When you open an Access database - even for reading - Access needs to create a locking file. When that can't be done, you get the error you've seen.

Let us know?

Ken
Microsoft MVP [ASP.NET]

"RML" <RM*@discussions.microsoft.com> wrote in message
news:A3**********************************@microsof t.com...
Hi,

I have an ASP.NET app which opens a MS Access database using the Het 4.0 OleDB provider. My development code abd database live on my D drive.
Under .NET's Server Explorer I created a connection to the Access
database and used this connection in my OleDBConnection object. When I run the app, all works fine.

I then moved the database to my C drive, created the new connection and used it in my app. When opening the database, the following error is
generated...

File xxx.mdb is exclusivly opened by another user or, you do not have
permission to view its data.

Anyone have any thoughts.

Mark


Nov 18 '05 #5
Here are the specific instructions:

PRB: Cannot connect to Access database from ASP.NET

http://support.microsoft.com/default...b;en-us;316675

"Grant read and write permissions for the "Everyone" group on the database
and the database folder. This method is not safe; therefore, Microsoft does
not recommend this method."

"RML" <RM*@discussions.microsoft.com> wrote in message
news:DE**********************************@microsof t.com...
Hi Ken, thanks for the info.

I gave "Everyone" and the "ASPNET" accounts Modify permissions on this mdb
file, and now the error "Could not lock file" appears.

No one else is using it, and I can open it in Access with no problems.

Note: The mdb that opens fine (on my D drvie) has "Everyone" with Full
Control.

Mark

"Ken Cox [Microsoft MVP]" wrote:
Hi Mark,

That error usually means that the ASPNET account (or whoever it is
impersonating) doesn't have sufficient permissions to write to the
directory
where the .mdb file is located.

When you open an Access database - even for reading - Access needs to
create
a locking file. When that can't be done, you get the error you've seen.

Let us know?

Ken
Microsoft MVP [ASP.NET]

"RML" <RM*@discussions.microsoft.com> wrote in message
news:A3**********************************@microsof t.com...
> Hi,
>
> I have an ASP.NET app which opens a MS Access database using the Het
> 4.0
> OleDB provider. My development code abd database live on my D drive.
> Under .NET's Server Explorer I created a connection to the Access
> database and used this connection in my OleDBConnection object. When I
> run the app, all works fine.
>
> I then moved the database to my C drive, created the new connection and
> used it in my app. When opening the database, the following error is
> generated...
>
> File xxx.mdb is exclusivly opened by another user or, you do not have
> permission to view its data.
>
> Anyone have any thoughts.
>
> Mark
>
>



Nov 18 '05 #6
RML
Greg, that did the trick. Thanks for the help.

Mark

"Greg Burns" wrote:
You need to give modify rights to the folder the .mdb file is in. Access
wants to create/write to the .ldb file in the same directory.

Greg

"RML" <RM*@discussions.microsoft.com> wrote in message
news:DE**********************************@microsof t.com...
Hi Ken, thanks for the info.

I gave "Everyone" and the "ASPNET" accounts Modify permissions on this mdb

file, and now the error "Could not lock file" appears.

No one else is using it, and I can open it in Access with no problems.

Note: The mdb that opens fine (on my D drvie) has "Everyone" with Full

Control.

Mark

"Ken Cox [Microsoft MVP]" wrote:
Hi Mark,

That error usually means that the ASPNET account (or whoever it is
impersonating) doesn't have sufficient permissions to write to the directory where the .mdb file is located.

When you open an Access database - even for reading - Access needs to create a locking file. When that can't be done, you get the error you've seen.

Let us know?

Ken
Microsoft MVP [ASP.NET]

"RML" <RM*@discussions.microsoft.com> wrote in message
news:A3**********************************@microsof t.com...
> Hi,
>
> I have an ASP.NET app which opens a MS Access database using the Het 4.0 > OleDB provider. My development code abd database live on my D drive.
> Under .NET's Server Explorer I created a connection to the Access
> database and used this connection in my OleDBConnection object. When I > run the app, all works fine.
>
> I then moved the database to my C drive, created the new connection and > used it in my app. When opening the database, the following error is
> generated...
>
> File xxx.mdb is exclusivly opened by another user or, you do not have
> permission to view its data.
>
> Anyone have any thoughts.
>
> Mark
>
>


Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
3730
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
10
2744
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
9
2178
by: Nathan Sokalski | last post by:
I am trying to connect to a Microsoft Access Database from my ASP.NET Application. I use the following code to create my connection string: cmdSelect.Connection = New...
0
1122
by: Marco Castro | last post by:
Im trying to create a system service that will read some records within an access file. From these values I will then be able to see if other software in the system is up to date and install the...
8
1102
by: Nathan Sokalski | last post by:
I am trying to connect to a Microsoft Access Database from my ASP.NET Application. I use the following code to create my connection string: cmdSelect.Connection = New...
0
7094
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6839
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5427
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4863
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3066
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
259
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.