Multimobile Development: Building Applications for any Smartphone
The Microsoft Jet database engine cannot open the file
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-oledb' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Greg Merideth
-- Moved from [aspngstart] to [ngfx-oledb] by Ken Schaefer <Click here to reveal e-mail address> --

Ok, I give up. I am getting this error no matter what I try to do to
access an access database to get familer with asp.net as I can't afford
sql server to do sql testing.

I've installed MDAC 2.7 and made sure I added "aspuser" to the directory
(and all files inside) as full control (read,write,change,delete). I
erased the DSN that I setup to use ODBC to access the database and the
database itself has no username/password on it.

I found tons of information online but it all pointed to mdac 2.7 and
the username combo solution which I was well aware of from programming
in regular ASP.

An article from MS suggested making the "aspprocess" run in the system
context but I'll be dammed if I can figure out how to make that happen.
Machine.config is still a blur of mush to me at the moment.

--------------------------------

The Microsoft Jet database engine cannot open the file
'D:\Databases\aspnet.mdb'. It is already opened exclusively by another
user, or you need permission to view its data.

Source Error:

Line 17: SQLstring = "SELECT * FROM shipping_methods"
Line 18: myConnection = New
OleDBConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=D:\Databases\aspnet.mdb")
Line 19: myConnection.Open()
Line 20: myCommand = New OleDbCommand(SQLstring, myConnection)
Line 21: myReader = myCommand.ExecuteReader()

Reply to this message...
Vote that this is a GOOD answer...
 
Really good experience at the Apple Store
MonoDroid – looking *awesome*
 
    
Daniel Naumann
Greg,

The RTM .NET runs under a different account to the previous versions. it use to run a an
administrator, but they changed that for security reasons. it now runs under the account ASPNET.
Does that user have access to the database?

Daniel.

-----Original Message-----
From: Greg Merideth [mailto:Click here to reveal e-mail address]
Sent: 13-Mar-2002 01:59
To: ngfx-oledb
Subject: [ngfx-oledb] The Microsoft Jet database engine cannot open the
file

-- Moved from [aspngstart] to [ngfx-oledb] by Ken Schaefer <Click here to reveal e-mail address> --

Ok, I give up. I am getting this error no matter what I try to do to
access an access database to get familer with asp.net as I can't afford
sql server to do sql testing.

I've installed MDAC 2.7 and made sure I added "aspuser" to the directory
(and all files inside) as full control (read,write,change,delete). I
erased the DSN that I setup to use ODBC to access the database and the
database itself has no username/password on it.

I found tons of information online but it all pointed to mdac 2.7 and
the username combo solution which I was well aware of from programming
in regular ASP.

An article from MS suggested making the "aspprocess" run in the system
context but I'll be dammed if I can figure out how to make that happen.
Machine.config is still a blur of mush to me at the moment.

--------------------------------

The Microsoft Jet database engine cannot open the file
'D:\Databases\aspnet.mdb'. It is already opened exclusively by another
user, or you need permission to view its data.

Source Error:

Line 17: SQLstring = "SELECT * FROM shipping_methods"
Line 18: myConnection = New
OleDBConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=D:\Databases\aspnet.mdb")
Line 19: myConnection.Open()
Line 20: myCommand = New OleDbCommand(SQLstring, myConnection)
Line 21: myReader = myCommand.ExecuteReader()

| [ngfx-oledb] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-oledb.asp = JOIN/QUIT

Reply to this message...
Vote that this is a GOOD answer...
 
First volume of Multimobile Development nearly ready to go to press
A mention on Developing for the iPhone and Android: The pros and cons
 
    
Ken Schaefer (VIP)
Greg,

What are the NTFS permissions for the file in question?
What are the NTFS permissions for the folder that the file is in (Access
needs to create and destroy it's little .ldb lockfile - if the user in
question doesn't have sufficient priveleges to the folder that could be the
problem as well).

As a suggestion (to help in seeing if this is a permissions related
problem), try giving the Everyone group Full Control to the folder (and
making sure that the permissions are propogated to files/folders)

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Greg Merideth" <Click here to reveal e-mail address>
Subject: [ngfx-oledb] RE: The Microsoft Jet database engine cannot open the
file

: I've added aspnet as a user accessable to the database (via nt
: permissions) and then I found and edited the machine.config to make asp
: net process run in the "system" account and still aspnet cannot access
: the database.
:
: The database was created with access2002 but I don't think that should
: matter.
:
:
: -----Original Message-----
: From: Daniel Naumann [mailto:Click here to reveal e-mail address]
: Sent: Wednesday, March 13, 2002 12:53 AM
: To: ngfx-oledb
: Subject: [ngfx-oledb] RE: The Microsoft Jet database engine cannot open
: the file
:
:
: Greg,
:
: The RTM .NET runs under a different account to the previous versions.
: it use to run a an administrator, but they changed that for security
: reasons. it now runs under the account ASPNET. Does that user have
: access to the database?
:
: Daniel.
:
: -----Original Message-----
: From: Greg Merideth [mailto:Click here to reveal e-mail address]
: Sent: 13-Mar-2002 01:59
: To: ngfx-oledb
: Subject: [ngfx-oledb] The Microsoft Jet database engine cannot open the
: file
:
:
: -- Moved from [aspngstart] to [ngfx-oledb] by Ken Schaefer
: <Click here to reveal e-mail address> --
:
: Ok, I give up. I am getting this error no matter what I try to do to
: access an access database to get familer with asp.net as I can't afford
: sql server to do sql testing.
:
: I've installed MDAC 2.7 and made sure I added "aspuser" to the directory
: (and all files inside) as full control (read,write,change,delete). I
: erased the DSN that I setup to use ODBC to access the database and the
: database itself has no username/password on it.
:
: I found tons of information online but it all pointed to mdac 2.7 and
: the username combo solution which I was well aware of from programming
: in regular ASP.
:
: An article from MS suggested making the "aspprocess" run in the system
: context but I'll be dammed if I can figure out how to make that happen.
: Machine.config is still a blur of mush to me at the moment.
:
: --------------------------------
:
: The Microsoft Jet database engine cannot open the file
: 'D:\Databases\aspnet.mdb'. It is already opened exclusively by another
: user, or you need permission to view its data.
:
: Source Error:
:
: Line 17: SQLstring = "SELECT * FROM shipping_methods"
: Line 18: myConnection = New
: OleDBConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data
: Source=D:\Databases\aspnet.mdb")
: Line 19: myConnection.Open()
: Line 20: myCommand = New OleDbCommand(SQLstring, myConnection)
: Line 21: myReader = myCommand.ExecuteReader()

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply to this message...
Vote that this is a GOOD answer...
 
 
    
jay shah
Greg,

Were you able to find a solution?

I am facing the same problem. I have tried my best changing the username in the machine.config file to SYSTEM and also giving the ASP.NET user permission to the database.

I have also given read/write permission to the Everyone account.

Any more ideas????????????????

Thanks, Jay
Reply to this message...
Vote that this is a GOOD answer...
 
First chapters of Multimobile Development book now available on Apress Alpha program
iPad
 
    
jay shah
Greg,

Were you able to find a solution?

I am facing the same problem. I have tried my best changing the username in the machine.config file to SYSTEM and also giving the ASP.NET user permission to the database.

I have also given read/write permission to the Everyone account.

Any more ideas????????????????

Thanks, Jay
Reply to this message...
Vote that this is a GOOD answer...
 
New book project – Multimobile Development: Building Applications for any Smartphone
Dive into HTML5
 
 
System.Data.OleDb.OleDbCommand




Multimobile Development: Building Applications for any Smartphone
Ad
BootFX
Reliable and powerful .NET application framework.
iOS, Android and Windows Phone Development Training and Consultancy
Hosted by RackSRV Communications
 
Multimobile Development: Building Applications for any Smartphone
Copyright © AMX Software Ltd 2008-2010. Portions copyright © Matthew Baxter-Reynolds 2001-2010. All rights reserved.
Contact Us - Terms of Use - Privacy Policy - 4.0.30129.1734