Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Cannot Open Access File

Reply
Thread Tools

Cannot Open Access File

 
 
dancer
Guest
Posts: n/a
 
      07-09-2007
Using ASP.net 1.1 and Microsoft Access.

I received the following error message. Why? I have closed the Access
file. I have another very small access file that opens with no trouble with
the same code, except a different name for the file.
The Microsoft Jet database engine cannot open the file
'C:\Inetpub\wwwroot\Accident.mdb'. It is already opened exclusively by
another user, or you need permission to view its data.



 
Reply With Quote
 
 
 
 
David Wier
Guest
Posts: n/a
 
      07-09-2007
First - have you ever been able to open it before, through the web page?
If not - make sure the ASPNet user has 'Change' permissions on the folder
where the Access file resides.

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://iWritePro.com



"dancer" <> wrote in message
news:O$...
> Using ASP.net 1.1 and Microsoft Access.
>
> I received the following error message. Why? I have closed the Access
> file. I have another very small access file that opens with no trouble
> with the same code, except a different name for the file.
> The Microsoft Jet database engine cannot open the file
> 'C:\Inetpub\wwwroot\Accident.mdb'. It is already opened exclusively by
> another user, or you need permission to view its data.
>
>
>



 
Reply With Quote
 
 
 
 
dancer
Guest
Posts: n/a
 
      07-09-2007
How do I give 'change' permissions? And why didn't I have to give
persmissions on my other file?


"David Wier" <> wrote in message
news:...
> First - have you ever been able to open it before, through the web page?
> If not - make sure the ASPNet user has 'Change' permissions on the folder
> where the Access file resides.
>
> --
> David Wier
> MVP/ASPInsider
> http://aspnet101.com
> http://iWritePro.com
>
>
>
> "dancer" <> wrote in message
> news:O$...
>> Using ASP.net 1.1 and Microsoft Access.
>>
>> I received the following error message. Why? I have closed the Access
>> file. I have another very small access file that opens with no trouble
>> with the same code, except a different name for the file.
>> The Microsoft Jet database engine cannot open the file
>> 'C:\Inetpub\wwwroot\Accident.mdb'. It is already opened exclusively by
>> another user, or you need permission to view its data.
>>
>>
>>

>
>



 
Reply With Quote
 
sloan
Guest
Posts: n/a
 
      07-09-2007
Permissions, permissions permissions.

...

access needs to create a ldb file, which basically is a internal file which
says "userA is logged in" along with other stuff.
but the account which asp.net runs under MUST have permissions to the mdb
file, and to the directory to create/destroy this ldb file.



"dancer" <> wrote in message
news:...
> How do I give 'change' permissions? And why didn't I have to give
> persmissions on my other file?
>
>
> "David Wier" <> wrote in message
> news:...
> > First - have you ever been able to open it before, through the web page?
> > If not - make sure the ASPNet user has 'Change' permissions on the

folder
> > where the Access file resides.
> >
> > --
> > David Wier
> > MVP/ASPInsider
> > http://aspnet101.com
> > http://iWritePro.com
> >
> >
> >
> > "dancer" <> wrote in message
> > news:O$...
> >> Using ASP.net 1.1 and Microsoft Access.
> >>
> >> I received the following error message. Why? I have closed the Access
> >> file. I have another very small access file that opens with no trouble
> >> with the same code, except a different name for the file.
> >> The Microsoft Jet database engine cannot open the file
> >> 'C:\Inetpub\wwwroot\Accident.mdb'. It is already opened exclusively by
> >> another user, or you need permission to view its data.
> >>
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      07-09-2007
"dancer" <> wrote in message
news:...

> How do I give 'change' permissions?


Right-click on the folder, click Properties, Security...

> And why didn't I have to give persmissions on my other file?


When using Jet databases you don't just need write permissions on the .mdb
file - you also need write permissions on the folder to allow the Jet engine
to create the locking database (*.ldb) file...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      07-09-2007
"sloan" <> wrote in message
news:...

> access needs to create a ldb file


Just to maintain a certain level of accuracy here, Microsoft Access is not
actually involved in any of this process at any stage...

The OP says he's "Using ASP.net 1.1 and Microsoft Access" - clearly, this is
a web app so Microsoft Access isn't installed on the server (at least, I
hope it isn't!)

What we have here is a Jet database being interfaced through ADO.NET. When a
Jet database is opened for shared access, it is the Jet engine which tries
to create the locking (*.ldb) database.

The error message which the OP is getting: "The Microsoft Jet database
engine cannot open the file" is the key here.

It is the Jet engine, not Microsoft Access, which is trying to open the Jet
database, but it is unable to create the corresponding locking database due
to insufficient folder permissions, and so throws the error.

None of this has anything whatsoever to do with Microsoft Access...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
sloan
Guest
Posts: n/a
 
      07-09-2007

Good catch!

Thanks Mark.

However, I have found the error messages are sometimes a little "off" (not
in this case, but in general) with access errors.
Even the version of access might affect it I think.
I've run some Access97 tests, and get weirdo error messages when the
permissions aren't right.



"Mark Rae [MVP]" <> wrote in message
news:...
> "sloan" <> wrote in message
> news:...
>
> > access needs to create a ldb file

>
> Just to maintain a certain level of accuracy here, Microsoft Access is not
> actually involved in any of this process at any stage...
>
> The OP says he's "Using ASP.net 1.1 and Microsoft Access" - clearly, this

is
> a web app so Microsoft Access isn't installed on the server (at least, I
> hope it isn't!)
>
> What we have here is a Jet database being interfaced through ADO.NET. When

a
> Jet database is opened for shared access, it is the Jet engine which tries
> to create the locking (*.ldb) database.
>
> The error message which the OP is getting: "The Microsoft Jet database
> engine cannot open the file" is the key here.
>
> It is the Jet engine, not Microsoft Access, which is trying to open the

Jet
> database, but it is unable to create the corresponding locking database

due
> to insufficient folder permissions, and so throws the error.
>
> None of this has anything whatsoever to do with Microsoft Access...
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net
>



 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      07-09-2007
"sloan" <> wrote in message
news:...

> However, I have found the error messages are sometimes a little "off" (not
> in this case, but in general) with access errors.


*Access* errors...?

> Even the version of access might affect it I think.


Version of *Access*...?

> I've run some Access97 tests, and get weirdo error messages when the
> permissions aren't right.


You've installed Access 97 on your web server...???


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      07-09-2007
Access97 is a bit quirky for web access.
I'd consider upgrading the database to Access 2000 or Access 2003.

re:
!> You've installed Access 97 on your web server...???

I hope not.
Access itself isn't needed on the server. Just the database.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
"Mark Rae [MVP]" <> wrote in message news:ucyKi%...
> "sloan" <> wrote in message news:...
>
>> However, I have found the error messages are sometimes a little "off" (not
>> in this case, but in general) with access errors.

>
> *Access* errors...?
>
>> Even the version of access might affect it I think.

>
> Version of *Access*...?
>
>> I've run some Access97 tests, and get weirdo error messages when the
>> permissions aren't right.

>
> You've installed Access 97 on your web server...???


>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net



 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      07-09-2007
"Juan T. Llibre" <> wrote in message
news:...

> Access97 is a bit quirky for web access.
> I'd consider upgrading the database to Access 2000 or Access 2003.


By which, of course, you mean that Jet 3.5 is a bit quirky for web access,
and you'd consider upgrading the database to Jet 4.0 (Access 2000, 2002 and
2003 all use the Jet 4.0 database by default)

> Access itself isn't needed on the server. Just the database.


Exactly - just the Jet database is needed on the server...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot delete a file the process cannot access the file because it is being used by another process ASp.net 2 ary ASP .Net 2 11-29-2006 04:30 AM
Cannot delete a file the process cannot access the file because it is being used by another process ASp.net 2 ary ASP .Net 0 11-28-2006 09:13 AM
Why cannot open .txt file with Encoding = UNICODE using javascript window.open()? ml Java 2 11-30-2004 02:10 PM
Why cannot open .txt file with Encoding = UNICODE using javascript window.open()? ml Java 0 11-30-2004 07:43 AM
The file 'bin\WebProj.dll' cannot be copied to the run directory. The requested operation cannot be performed on a file with a user-mapped section open. J Gao ASP .Net 0 07-28-2003 04:18 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57