ACCESS DB - How do I get .NET to talk

  • Thread starter Thread starter Chester West
  • Start date Start date
C

Chester West

OK...I give up

It would seem like Microsoft decided that they really
liked SQL server, and so made it impossible for .NET to
talk to ACCESS.

I am using the 1.0 framework.

I was getting a "The Microsoft Jet database engine cannot
open the file <filename>. It is already opened exclusively
by another user, or you need permission to view its data."
message.

This led me to KB 316675.

So...I modified the machine.conf file (which means that,
although I MIGHT get it to work on my machine, it probably
won't work when it is hosted on the ISP) and behold...Now
I get the message "Cannot Lock File" when I try to open
the file to perform a SQL select statement.

Pardon my french, but WHAT THE HELL DO I NEED TO DO TO GET
THIS STUPID THING WORKING?

Can somebody provide a code sample????

Thanks
 
Hi Chester,

IMO You are experiencing non .net problems.
Are you sure that no other app is accessing mdb file or mdb file isn't
locked exclusively or you don't have enough file privileges, etc.
IOW - can you open the same file within Access itself?
 
Hi

I had similar problems with Access and the two things I
did were to allow access to the folder where the database
is and to set up an ASP.Net Machine Account which has
access to the database and its folder (right click on the
database and select properties then security to set up the
ASP.Net Machine Account).

I hope that helps.
 
¤ OK...I give up
¤
¤ It would seem like Microsoft decided that they really
¤ liked SQL server, and so made it impossible for .NET to
¤ talk to ACCESS.
¤
¤ I am using the 1.0 framework.
¤
¤ I was getting a "The Microsoft Jet database engine cannot
¤ open the file <filename>. It is already opened exclusively
¤ by another user, or you need permission to view its data."
¤ message.
¤
¤ This led me to KB 316675.
¤
¤ So...I modified the machine.conf file (which means that,
¤ although I MIGHT get it to work on my machine, it probably
¤ won't work when it is hosted on the ISP) and behold...Now
¤ I get the message "Cannot Lock File" when I try to open
¤ the file to perform a SQL select statement.
¤
¤ Pardon my french, but WHAT THE HELL DO I NEED TO DO TO GET
¤ THIS STUPID THING WORKING?
¤
¤ Can somebody provide a code sample????

As Miha mentioned this is not a code issue, it's a NTFS permissions issue.

Make certain that the ASPNET account has CRUD (Create/Read/Update/Delete) access to the folder where
the database resides.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Back
Top