473,386 Members | 1,819 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,386 software developers and data experts.

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:
oleDbDataAdapter1.Fill(dataSet1);
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\PAW Files\Databases\Friends\Friends.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\wwwroot 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 4431
On Wed, 3 Aug 2005 06:27:05 -0700, "Dave" <Da**@discussions.microsoft.com> 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:
¤ oleDbDataAdapter1.Fill(dataSet1);
¤ 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\PAW Files\Databases\Friends\Friends.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\wwwroot 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 "Unspecified 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**@discussions.microsoft.com> 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:
¤ oleDbDataAdapter1.Fill(dataSet1);
¤ 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\PAW Files\Databases\Friends\Friends.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\wwwroot 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**@discussions.microsoft.com> 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 "Unspecified 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<machinename>
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_<machinename> 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**@discussions.microsoft.com> 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 "Unspecified 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<machinename>
account.
Paul
~~~~
Microsoft MVP (Visual Basic)

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

¤ I am using anonymous authentication I think. I am reading a lot of stuff and
¤ getting very confused. Is it the IUSR_<machinename> 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
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....
5
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...
2
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...
3
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...
1
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...
2
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...
4
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...
2
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
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...
2
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) ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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,...

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.