473,728 Members | 2,062 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

File Already In Use

I am using the following connection to connect to a MS-Access
database:

---------------------------------
set con = server.createOb ject("adodb.con nection")

path1 = server.mappath( "./db/MyDB.mdb")

con.open "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source="& path1
&";Persist Security Info=False"
---------------------------------

In order to ensure that the admin can write/modify the database, I
have given the IUSR_MachineNam e Write & Modify permissions to the
Access database but when I do so, ASP generates the following error:

---------------------------------
Microsoft JET Database Engine error '80004005'

Could not use ''; file already in use.

/inc/connection.inc, line 16
---------------------------------

which points to the con.open line shown above.

What's causing this error & how do I resolve it?

Note that if I revoke the Write & Modify permissions, then the above
error doesn't get generated but when the admin tries to insert a new
record, then he is not allowed to do so & the following error gets
generated:

---------------------------------
Microsoft JET Database Engine error '80040e09'

Cannot update. Database or object is read-only.

/inc/global.asp, line 9
---------------------------------

Line no. 9 is

objRS.AddNew

Jun 5 '07 #1
5 6533
rn**@rediffmail .com wrote:
I am using the following connection to connect to a MS-Access
database:

---------------------------------
set con = server.createOb ject("adodb.con nection")

path1 = server.mappath( "./db/MyDB.mdb")

con.open "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source="& path1
&";Persist Security Info=False"
---------------------------------

In order to ensure that the admin can write/modify the database, I
have given the IUSR_MachineNam e Write & Modify permissions to the
Access database but when I do so, ASP generates the following error:

---------------------------------
Microsoft JET Database Engine error '80004005'

Could not use ''; file already in use.
All users of an Access database require Modify permissions for the
_folder_ containing the database. This is to allow the users to create,
modify and delete the ldb file that is used to control multi-user
activity in the database. If Jet does not see an ldb file, it assumes
the database is single-user only.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jun 5 '07 #2
On Jun 6, 3:13 am, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
wrote:
r...@rediffmail .com wrote:
I am using the following connection to connect to a MS-Access
database:
---------------------------------
set con = server.createOb ject("adodb.con nection")
path1 = server.mappath( "./db/MyDB.mdb")
con.open "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source="& path1
&";Persist Security Info=False"
---------------------------------
In order to ensure that the admin can write/modify the database, I
have given the IUSR_MachineNam e Write & Modify permissions to the
Access database but when I do so, ASP generates the following error:
---------------------------------
Microsoft JET Database Engine error '80004005'
Could not use ''; file already in use.

All users of an Access database require Modify permissions for the
_folder_ containing the database. This is to allow the users to create,
modify and delete the ldb file that is used to control multi-user
activity in the database. If Jet does not see an ldb file, it assumes
the database is single-user only.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.- Hide quoted text -

- Show quoted text -
Thanks Bob for the prompt response. The folder in which the Access DB
file resides does have the Write & Modify permissions but either of
the 2 errors still persist.

Any other suggestion?

RON

Jun 5 '07 #3
rn**@rediffmail .com wrote:
On Jun 6, 3:13 am, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
wrote:
>r...@rediffmai l.com wrote:
>>I am using the following connection to connect to a MS-Access
database:
>>---------------------------------
set con = server.createOb ject("adodb.con nection")
>>path1 = server.mappath( "./db/MyDB.mdb")
>>con.open "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source="& path1
&";Persist Security Info=False"
---------------------------------
>>In order to ensure that the admin can write/modify the database, I
have given the IUSR_MachineNam e Write & Modify permissions to the
Access database but when I do so, ASP generates the following error:
>>---------------------------------
Microsoft JET Database Engine error '80004005'
>>Could not use ''; file already in use.

All users of an Access database require Modify permissions for the
_folder_ containing the database. This is to allow the users to
create, modify and delete the ldb file that is used to control
multi-user activity in the database. If Jet does not see an ldb
file, it assumes the database is single-user only.
>- Show quoted text -

Thanks Bob for the prompt response. The folder in which the Access DB
file resides does have the Write & Modify permissions but either of
the 2 errors still persist.
Lack of permissions is the only reason for the errors you are getting (esp.
the "already in use" error). You need to properly identify and grant
permissions to the users attempting to open the database. If your site has
Anonymous enabled, then it's the IUSR account that needs those permissions.
Sometimes, depending on the site's isolation property setting, the IWAM
account also needs permission.

If Anonymous is disabled, then it's the actual users that require
permissions.

And don't forget the user that has the database open in Access itself :-)

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jun 5 '07 #4

Bob Barrows [MVP] wrote:
*r***@rediffmai l.com wrote:
On Jun 6, 3:13 am, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
wrote:

Thanks Bob for the prompt response. The folder in which the Access
DB
file resides does have the Write & Modify permissions but either
of
the 2 errors still persist.

Lack of permissions is the only reason for the errors you are getting
(esp.
the "already in use" error). You need to properly identify and grant
permissions to the users attempting to open the database. If your
site has
Anonymous enabled, then it's the IUSR account that needs those
permissions.
Sometimes, depending on the site's isolation property setting, the
IWAM
account also needs permission.

If Anonymous is disabled, then it's the actual users that require
permissions.

And don't forget the user that has the database open in Access itself
:-)

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so
I
don't check it very often. If you must reply off-line, then remove
the
"NO SPAM" *
i have same trouble with database connection and there are 2 error like
that
can you explain again how to resolve it ??
the folder that containing database is not read only
thank you

--
randy thio
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Jun 12 '07 #5
randy thio wrote:
i have same trouble with database connection and there are 2 error
like that
can you explain again how to resolve it ??
the folder that containing database is not read only
thank you
I don't know what else I can say that would not repeat what I have already
said in this thread.
The only reason for getting those errors is an inability of the users to
createe, modify and delete the .ldb file in the folder containing the
database. It always boils down to lack of permissions. All database users
require Modify (read/write) permissions for the folder containing the
database. I have never seen another cause for this.
As I see it, there are two hurdles:
1. Identifying the database users: if your website has Anonymous access
enabled, then the IUSR_machinenam e account requires those permissions.
Sometimes, the IWAM_machine account also requires them. If your website is
on a WAN or LAN, and Anonymous is disabled, then the domain users of the
database require permissions.
2. If you are using XP out-of-the-box, then Simple File Sharing is enabled,
preventing you from explicitly granting permissions to the folder to
specific users. You have to disable Simple File Sharing before you will be
able to correctly set the permissions.
http://www.aspfaq.com/show.asp?id=2205

See? I'm repeating myself...

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jun 12 '07 #6

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

Similar topics

0
1666
by: Mairhtin O'Feannag | last post by:
I have done a make, and a make install on the 4.3.6 version, using /usr/local/etc/php as the directory I make from. However, no matter what I do, I do not see a php4lib.so that has been created. The documentation I recieved (an IBM source) says that the following has to be added to the httpd.conf file : LoadModule php4_modulelib/apache/libphp4.so .. .. ..
10
2744
by: Dennis Farr | last post by:
It has been suggested that rather than convert an already large flat file, with many similar rows, to XML, some type of header be attached to the file, containing some sort of meta-XML description of the rows that follow. The hope is that the result will not grow as large as a pure XML file, but still be easy to exchange. Multiple vendors would still be able to track format changes easily. The size of the flat file, without XML, is already...
7
12965
by: A_StClaire_ | last post by:
hi, I'm working on a project spanning five .cpp files. each file was used to define a class. the first has my Main and an #include for each of the other files. problem is my third file needs to access the class defined in my second file and I can't figure out how to work this right. if I use an #include in my third file, my Main gives me a compile-time class redefinition error. if I don't, the third file can't "see" the second
6
13727
by: Chad Crowder | last post by:
Getting the following error on my production server whether the file exists or not: "System.IO.IOException: Cannot create a file when that file already exists." Here's the code generating the error (seems to be happening when I try creating a directory) If dirmgr.Exists("s:\blah\" & txt_name.Text) Then lblerror.Text = lblerror.Text & "Unable to build physical path. " &
9
3734
by: Nathan Sokalski | last post by:
I am recieving an error about not being able to use a file because it is already in use. Based on the error, I think it is referring to my DB, but I don't know how to avoid the error or why it is happening. Here is the error: Server Error in '/LVBEP' Application. -------------------------------------------------------------------------------- Could not use ''; file already in use. Description: An unhandled exception occurred during the...
6
10216
by: Don | last post by:
I'm having problems working with a streamwriter object. After closing the streamwriter and setting it to Nothing, I try to delete the file it was writing to, but I always get the following error message: "The process cannot access the file "whatever" because it is being used by another process." I've even tried opening another file using the same streamwriter object before deleting the original file, but it's no use. Something keeps...
7
13995
by: emanshu | last post by:
HI all, I an designing an application in C++. i want to open file requested by end user but i want to reflect an error to user if file is already opened by some other application.. will anybody tell me that how to know that the file is already open or closed.. any help is highly appreciated...
26
4949
by: Army1987 | last post by:
Is this a good way to check wheter a file already exists? #include <stdio.h> #include <stdlib.h> int ask(const char *prompt); typedef char filename; int main(int argc, char *argv) { FILE *in, *out;
10
10622
by: David | last post by:
I have googled to no avail on getting specifically what I'm looking for. I have found plenty of full blown apps that implement some type of file transfer but what I'm specifcally looking for is an example to follow for using a tcp socket to transfer files between client/server, server/client. Both server and client are my program so I'm not looking for how to implement an FTP client, or how to download a file from a web server via http...
15
5274
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to show - text boxes, input boxes, buttons, hyperlinks ie the usual. The data is not obtained directly from a database.
0
8904
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
8759
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9277
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
9135
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
8133
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...
0
4524
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3236
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2161
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.