473,804 Members | 3,762 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2033
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******@commu nity.nospam> wrote in message
news:Ol******** ******@TK2MSFTN GP14.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.ne t> wrote in message
news:O9******** *****@TK2MSFTNG P15.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******@commu nity.nospam> wrote in message
news:Ol******** ******@TK2MSFTN GP14.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******@commu nity.nospam> wrote in message
news:Ol******** ******@TK2MSFTN GP14.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%******** ********@TK2MSF TNGP09.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******@commu nity.nospam> wrote in message
news:Ol******** ******@TK2MSFTN GP14.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
5422
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 must use an updateable query. /catamaranco/accounts/email_inc.asp, line 264 Set cnn = CreateObject("ADODB.Connection") strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("../database/acc.mdb") '//This one is for Access...
15
1377
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 error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x444 Thread 0xfe4 DBC 0x5200024 Jet'.
1
3625
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 looking at rewriting all my hard work in something else (wasting probably a month or more). (If you want to run and hide now, the error message is "The decimal field's precision is too small to accept the numeric you attempted to add." I haven't yet...
2
1923
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 on a shared access db as below. Conn = New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=\\Server\f\Events Data\Events Data.mdb;User
0
2098
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 to the same table. During the simultaneous add and update, a Locked error occurs, and most of the times it locks all the machines. I have been reading on Microsoft Site and on google groups that JET4 and ADO have fix for page locking , which...
3
8901
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 opening a connection with the code below:
4
2861
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 intranet .asp program works, but as soon as it tries to access the database for normal users, it gives us an "unspecified error" and that it can't access the data base. As the administrator, I found my access was relatively stable. Anyone else...
3
6216
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 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbaseFile cn.Open()
0
12070
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 '/CinemaBookingSystem' Application. -------------------------------------------------------------------------------- ERROR General error Unable to open registry key 'Temporary (volatile) Jet DSN for process
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10571
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10075
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9143
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7615
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
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 we have to send another system
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.