473,783 Members | 2,475 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The Microsoft Jet database engine cannot open the file

This is my first .NET project (although I am experienced with VS6 and
InterDev). I am simply trying to set up a basic ASPX project and connect to
an Access database (following the instructions in the .NET Black Book by
Templeman and Vitter). I have managed to set up an oleDbConnection , an
oleDbAdapter and a dataset, and have added one line of code:
oleDbDataAdapte r1.Fill(dataSet 1);
However when this line of code executes I get whole page of error headed
"The Microsoft Jet database engine cannot open the file 'C:\Documents and
Settings\Dave\P AW Files\Databases \Friends\Friend s.mdb'. It is already opened
exclusively by another user, or you need permission to view its data."
I am using Access 2000 SP3 and Windows XP SP2. There is no remote access,
the web application is being served from C:\Inetpub\wwwr oot by IIS5.1 (which
I think was installed when I installed VS6/Visual Interdev).
It's my very first attempt at .NET and I'm getting nowhere. Can somebody
please help.
--
Dave
Nov 19 '05 #1
5 4476
On Wed, 3 Aug 2005 06:27:05 -0700, "Dave" <Da**@discussio ns.microsoft.co m> wrote:

¤ This is my first .NET project (although I am experienced with VS6 and
¤ InterDev). I am simply trying to set up a basic ASPX project and connect to
¤ an Access database (following the instructions in the .NET Black Book by
¤ Templeman and Vitter). I have managed to set up an oleDbConnection , an
¤ oleDbAdapter and a dataset, and have added one line of code:
¤ oleDbDataAdapte r1.Fill(dataSet 1);
¤ However when this line of code executes I get whole page of error headed
¤ "The Microsoft Jet database engine cannot open the file 'C:\Documents and
¤ Settings\Dave\P AW Files\Databases \Friends\Friend s.mdb'. It is already opened
¤ exclusively by another user, or you need permission to view its data."
¤ I am using Access 2000 SP3 and Windows XP SP2. There is no remote access,
¤ the web application is being served from C:\Inetpub\wwwr oot by IIS5.1 (which
¤ I think was installed when I installed VS6/Visual Interdev).
¤ It's my very first attempt at .NET and I'm getting nowhere. Can somebody
¤ please help.

See the following MS KB article:

PRB: Cannot connect to Access database from ASP.NET
http://support.microsoft.com/default...b;en-us;316675
Paul
~~~~
Microsoft MVP (Visual Basic)
Nov 19 '05 #2
Thanks Paul. That's one I hadn't found.

I have now enabled impersonation on my project. However, I now have a bigger
problem - the same line of code now generates "Unspecifie d error: An
unhandled exception occurred during the execution of the current web request."

Any ideas?
--
Dave
"Paul Clement" wrote:
On Wed, 3 Aug 2005 06:27:05 -0700, "Dave" <Da**@discussio ns.microsoft.co m> wrote:

¤ This is my first .NET project (although I am experienced with VS6 and
¤ InterDev). I am simply trying to set up a basic ASPX project and connect to
¤ an Access database (following the instructions in the .NET Black Book by
¤ Templeman and Vitter). I have managed to set up an oleDbConnection , an
¤ oleDbAdapter and a dataset, and have added one line of code:
¤ oleDbDataAdapte r1.Fill(dataSet 1);
¤ However when this line of code executes I get whole page of error headed
¤ "The Microsoft Jet database engine cannot open the file 'C:\Documents and
¤ Settings\Dave\P AW Files\Databases \Friends\Friend s.mdb'. It is already opened
¤ exclusively by another user, or you need permission to view its data."
¤ I am using Access 2000 SP3 and Windows XP SP2. There is no remote access,
¤ the web application is being served from C:\Inetpub\wwwr oot by IIS5.1 (which
¤ I think was installed when I installed VS6/Visual Interdev).
¤ It's my very first attempt at .NET and I'm getting nowhere. Can somebody
¤ please help.

See the following MS KB article:

PRB: Cannot connect to Access database from ASP.NET
http://support.microsoft.com/default...b;en-us;316675
Paul
~~~~
Microsoft MVP (Visual Basic)

Nov 19 '05 #3
On Wed, 3 Aug 2005 08:49:41 -0700, "Dave" <Da**@discussio ns.microsoft.co m> wrote:

¤ Thanks Paul. That's one I hadn't found.
¤
¤ I have now enabled impersonation on my project. However, I now have a bigger
¤ problem - the same line of code now generates "Unspecifie d error: An
¤ unhandled exception occurred during the execution of the current web request."
¤
¤ Any ideas?

Sounds like there is still a security issue although the error isn't very descriptive. What level of
authentication are you using? If it's Anonymous and impersonation is enabled, then you probably need
to provide full permissions for the folder where the Access database is located to IUSR<machinenam e>
account.
Paul
~~~~
Microsoft MVP (Visual Basic)
Nov 19 '05 #4
I am using anonymous authentication I think. I am reading a lot of stuff and
getting very confused. Is it the IUSR_<machinena me> user I need to grant
permissions to, or is it ASPNET?
I think one of my problems is that my system uses something called
"guest-only" security instead of "classic" security. Does that make sense? I
think I need to change that first.
--
Dave
"Paul Clement" wrote:
On Wed, 3 Aug 2005 08:49:41 -0700, "Dave" <Da**@discussio ns.microsoft.co m> wrote:

¤ Thanks Paul. That's one I hadn't found.
¤
¤ I have now enabled impersonation on my project. However, I now have a bigger
¤ problem - the same line of code now generates "Unspecifie d error: An
¤ unhandled exception occurred during the execution of the current web request."
¤
¤ Any ideas?

Sounds like there is still a security issue although the error isn't very descriptive. What level of
authentication are you using? If it's Anonymous and impersonation is enabled, then you probably need
to provide full permissions for the folder where the Access database is located to IUSR<machinenam e>
account.
Paul
~~~~
Microsoft MVP (Visual Basic)

Nov 19 '05 #5
On Thu, 4 Aug 2005 09:04:08 -0700, "Dave" <Da**@discussio ns.microsoft.co m> wrote:

¤ I am using anonymous authentication I think. I am reading a lot of stuff and
¤ getting very confused. Is it the IUSR_<machinena me> user I need to grant
¤ permissions to, or is it ASPNET?
¤ I think one of my problems is that my system uses something called
¤ "guest-only" security instead of "classic" security. Does that make sense? I
¤ think I need to change that first.

If impersonation is enabled with Anonymous access then the IUSR (or IWAM) account is used depending
upon the Application Settings in IIS for the app. If impersonation is not enabled then the account
used is ASPNET (NetworkService in Windows 2003).
Paul
~~~~
Microsoft MVP (Visual Basic)
Nov 19 '05 #6

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

Similar topics

1
4710
by: Paul | last post by:
Hello, I know there are other messages concerning this error message, but they all look so confusing to me. I have an application that uses an Access database. No problems with permissions. I made a windows service of that application. I choose 'ServiceAccount.LocalService' in the ProjectInstaller (VS.NET) which means Anonymous User.
5
12520
by: Kamyk | last post by:
Hello all! I have a tough thing to fix. I have a database which has been corrupted. I got the following error messages while trying to open it: The Microsoft Jet database engine stopped the process because you and another user are attempting to change the same data at the same time The database is protected by password, so when I want to open I got the above error message. I cannot import data from this corrupted database into
2
2086
by: Abubakar | last post by:
Hello , I just finished developing a program using Microsoft Desktop Engine with C# as the front end. Everything is okay on my system. But, on trying to deploy it on a different system it gives an error message that it can open the database This is my first time in using the Microsoft Desktop engine. All this while I have been using Access as my database engine and normally what I do after developing a program is to transfer the Database file...
3
6893
by: Neal | last post by:
Hi All I am trying to connect from ASP.Net app to an Access Db. If i don't specify a userid an pwd.. I get this error The Microsoft Jet database engine cannot open the file 'C:\Documents and Settings\rogersn\My Documents\EEECourses.mdb'. It is already opened exclusively by another user, or you need permission to view its data." If i specify a userid (aspnet) no password I get
1
949
by: Morten Wennevik | last post by:
I'm transferring an Excel file from a client computer to a web-page on a server, then trying to open the file on the server causes this exception message to occur. The Microsoft Jet database engine cannot open the file ''. It is already opened exclusively by another user, or you need permission to view its data. I open the file using this connection string Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data
2
3310
by: rh.krish | last post by:
Hi I'm trying to open an excel file uploaded by the user and read the content. I'm able to save the file in the web server, but when I try to open it - I get the following error: "The Microsoft Jet database engine cannot open the file ''. It is already opened exclusively by another user, or you need permission to view its data. "
4
2312
by: klynn | last post by:
Hi: I'm having problems reading a Microsoft Access file from my ASP.Net app on a Windows Server 2003 machine. The error message: The Microsoft database engine cannot open the file, <my_file>. It is already opened exclusively by another user, or you need permission to view its data. I've read some info about this (microsoft support article q316675) but I'm still confused on what to do?
2
2052
by: HeMan_Speaks | last post by:
I m currently developing a java based application and want to know how can i make client access database located on the server?
2
5441
by: =?Utf-8?B?c25henp5?= | last post by:
I have created an web application using Visual Studio 2008. The application works OK in Debug. However it does not work after publish. The following message appers "The Microsoft Jet database engine cannot open the file '\\192.168.0.2\Test\Test.mdb'. It is already opened exclusively by another user or you need permission to view its data".
2
3675
by: student2 | last post by:
Hi, I'm a student looking for any recommendation to finding a solution to the following problem. (Hope I'm posting in the correct 'section' of the forum, since my error says both IIS and ASP) I'm running IIS on my WIndows XP Pro OS. I'm connecting an Access database (.mdb file) to Dreamweaver CS4. I've made the connection with the following string "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\mySite\mySite.mdb;"
0
9643
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
10315
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
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9946
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
8968
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
7494
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2877
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.