473,406 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Error opening connection to Access (Jet) DB

When using ASP.NET and an OleDBConnection control I get this error on
CNN.Open:

"The Microsoft Jet database engine cannot open the file
'C:\A2K\Backups\EdsBe2K.mdb'. It is already opened exclusively by another
user, or you need permission to view its data."

I have tried using a connection string, too, to no avail.

However, when I am in Windows Forms I have no problem opening the same file
using a connection control or connection string. There's no security on the
EdsBe2K.mdb file.

Thanks

Nov 19 '05 #1
5 2017
The most likely cause of this problem is the default ASPNET user account not
having permission to access that folder.
Grant the user account access or use Impersonation to have it run under
another user account that does have permission.
For testing purposes you can have it run under your personal user account
since that is what's probably being used successfully in your successful
WinForms test.
Here's more info:
http://msdn.microsoft.com/library/de...ersonation.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Burton Roberts" <Fl******@community.nospam> wrote in message
news:Ol**************@TK2MSFTNGP14.phx.gbl...
When using ASP.NET and an OleDBConnection control I get this error on
CNN.Open:

"The Microsoft Jet database engine cannot open the file
'C:\A2K\Backups\EdsBe2K.mdb'. It is already opened exclusively by another
user, or you need permission to view its data."

I have tried using a connection string, too, to no avail.

However, when I am in Windows Forms I have no problem opening the same
file using a connection control or connection string. There's no security
on the EdsBe2K.mdb file.

Thanks

Nov 19 '05 #2
Thanks!
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:O9*************@TK2MSFTNGP15.phx.gbl...
The most likely cause of this problem is the default ASPNET user account
not having permission to access that folder.
Grant the user account access or use Impersonation to have it run under
another user account that does have permission.
For testing purposes you can have it run under your personal user account
since that is what's probably being used successfully in your successful
WinForms test.
Here's more info:
http://msdn.microsoft.com/library/de...ersonation.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Burton Roberts" <Fl******@community.nospam> wrote in message
news:Ol**************@TK2MSFTNGP14.phx.gbl...
When using ASP.NET and an OleDBConnection control I get this error on
CNN.Open:

"The Microsoft Jet database engine cannot open the file
'C:\A2K\Backups\EdsBe2K.mdb'. It is already opened exclusively by another
user, or you need permission to view its data."

I have tried using a connection string, too, to no avail.

However, when I am in Windows Forms I have no problem opening the same
file using a connection control or connection string. There's no security
on the EdsBe2K.mdb file.

Thanks


Nov 19 '05 #3
Hi Burton,

Make sure the current user (e.g., ASPNET account) has sufficient permissions
(Change) in the directory where the .mdb file is located.

Access needs to open a locking (.ldb) file, so more than just read
permission is required.

Let us know if this gets you moving?

Ken
Microsoft MVP [ASP.NET]

"Burton Roberts" <Fl******@community.nospam> wrote in message
news:Ol**************@TK2MSFTNGP14.phx.gbl...
When using ASP.NET and an OleDBConnection control I get this error on
CNN.Open:

"The Microsoft Jet database engine cannot open the file
'C:\A2K\Backups\EdsBe2K.mdb'. It is already opened exclusively by another
user, or you need permission to view its data."

I have tried using a connection string, too, to no avail.

However, when I am in Windows Forms I have no problem opening the same
file using a connection control or connection string. There's no security
on the EdsBe2K.mdb file.

Thanks


Nov 19 '05 #4
Hi, Ken
It's working. But I think this had to do with the oledb connection control
on the design surface. When I deleted it and used the string everything
worked, but I had to delete the connection control, or so it seemed. Then I
put the connection control back in, just to see, but everything still
worked. So I'm not sure why it's working now. But I didn't touch the
permissions in the folder.
Thanks

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:e%****************@TK2MSFTNGP09.phx.gbl...
Hi Burton,

Make sure the current user (e.g., ASPNET account) has sufficient
permissions (Change) in the directory where the .mdb file is located.

Access needs to open a locking (.ldb) file, so more than just read
permission is required.

Let us know if this gets you moving?

Ken
Microsoft MVP [ASP.NET]

"Burton Roberts" <Fl******@community.nospam> wrote in message
news:Ol**************@TK2MSFTNGP14.phx.gbl...
When using ASP.NET and an OleDBConnection control I get this error on
CNN.Open:

"The Microsoft Jet database engine cannot open the file
'C:\A2K\Backups\EdsBe2K.mdb'. It is already opened exclusively by another
user, or you need permission to view its data."

I have tried using a connection string, too, to no avail.

However, when I am in Windows Forms I have no problem opening the same
file using a connection control or connection string. There's no security
on the EdsBe2K.mdb file.

Thanks

Nov 19 '05 #5
The it should be magic then!!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #6

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

Similar topics

6
by: jason | last post by:
I am picking up an error message on a straightforward INSERT - do I need an optimistic-type to get this working....here is is the error: Microsoft JET Database Engine error '80004005' Operation...
15
by: M P | last post by:
What does this mean? I am accessing an ASP page that queries Access Database thru fileDSN. I'm using IIS 5.0 Win2K SP4 Microsoft OLE DB Provider for ODBC Drivers error '80004005' General...
1
by: MyndPhlyp | last post by:
I am about to completely lose what is left of my poor mynd! The historical dissertation gets rather verbose, so I hope you can wade through it all. I really need some help on this one or I'm...
2
by: John | last post by:
Hi My app is in vb.net but the backend db is access. I am posting my question here as there is more access expertise here than in vb.net group. Here is the problem; I am opening a connection...
0
by: brijeshmathew | last post by:
Hi I use Visual Basic 6, Service Pack 6, Microsoft ActiveX Data Objects 2.8 Library(msado15.dll) and access 2000 database using JET 4 OLE. I have an application that adds records simultaneously...
3
by: Giuseppe D'Elia | last post by:
Hi there, I got a problem using an MS Access database through ASP.NET. After updating my system from .NET Framework 1.0 to 1.1, my existing application gives me the following error when...
4
by: Troy | last post by:
We recently installed the .Net framework on a windows 2000 server. Shortly after that we experienced intermitant problems running a web based program that accesses an Access 2002 database. The...
3
by: Jerry Spence1 | last post by:
I am starting up a number of threads. Each one specifies a connection to the same database. Sub ReaderThread() Dim cn As New System.Data.OleDb.OleDbConnection cn.ConnectionString =...
0
by: bazzer | last post by:
hey, im trying to access a microsoft access database from an ASP.NET web application in visual basic 2003.NET. i get the following error when i try running it: Server Error in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.