Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Path of the database ?


Message #1 by "Vandael Tim" <vandael_tim@h...> on Wed, 10 Apr 2002 12:55:49
This is my connection to my database.

Dim cnn1
	Set cnn1 = Server.CreateObject("ADODB.Connection")
	'cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & 
Server.MapPath ("/alpine/assortiment.mdb")
	cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=e:\-== 
nexans ==-\shopfloor\shopfloor.mdb;"
	Response.Expires = 0

But when i put the databse on the server, my application cant open the 
database.
The database is located on the U disk.
Everone has read and write rights to the mdb-file.

Error Type:
Microsoft JET Database Engine (0x80004005)
The Microsoft Jet database engine cannot open the 
file 'u:\apps\common\q_doc\shopfloor.mdb'. It is already opened 
exclusively by another user, or you need permission to view its data.

thnx

Vandael Tim
Message #2 by "Ken Schaefer" <ken@a...> on Thu, 11 Apr 2002 10:22:13 +1000
Is the webserver running on the same machine as the database is located?

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Vandael Tim" <vandael_tim@h...>
Subject: [access_asp] Path of the database ?


: Dim cnn1
: Set cnn1 = Server.CreateObject("ADODB.Connection")
: 'cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & 
: Server.MapPath ("/alpine/assortiment.mdb")
: cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=e:\-== 
: nexans ==-\shopfloor\shopfloor.mdb;"
: Response.Expires = 0
: 
: But when i put the databse on the server, my application cant open the 
: database.
: The database is located on the U disk.
: Everone has read and write rights to the mdb-file.
: 
: Error Type:
: Microsoft JET Database Engine (0x80004005)
: The Microsoft Jet database engine cannot open the 
: file 'u:\apps\common\q_doc\shopfloor.mdb'. It is already opened 
: exclusively by another user, or you need permission to view its data.

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

Message #3 by "Vandael Tim" <vandael_tim@h...> on Thu, 11 Apr 2002 07:31:04
No Ken, the database is on a file-server located.
The server is a win2K machine.
I think it has something to do with the user rights.
What users must have rights to the specified dir?
Is this IUSR_SERVER-NAME or the one that logs on to the Server?

Tim


> Is the webserver running on the same machine as the database is located?

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Vandael Tim" <vandael_tim@h...>
Subject: [access_asp] Path of the database ?


: Dim cnn1
: Set cnn1 = Server.CreateObject("ADODB.Connection")
: 'cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & 
: Server.MapPath ("/alpine/assortiment.mdb")
: cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=e:\-== 
: nexans ==-\shopfloor\shopfloor.mdb;"
: Response.Expires = 0
: 
: But when i put the databse on the server, my application cant open the 
: database.
: The database is located on the U disk.
: Everone has read and write rights to the mdb-file.
: 
: Error Type:
: Microsoft JET Database Engine (0x80004005)
: The Microsoft Jet database engine cannot open the 
: file 'u:\apps\common\q_doc\shopfloor.mdb'. It is already opened 
: exclusively by another user, or you need permission to view its data.

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

Message #4 by "sean dillon" <sdillon@b...> on Thu, 11 Apr 2002 10:40:11
Does anyone else have access to this drive. If so then someone else could 
also have the file open and this might be what is giving you the error.

> This is my connection to my database.

> Dim cnn1
	> Set cnn1 = Server.CreateObject("ADODB.Connection")
	> 'cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & 
S> erver.MapPath ("/alpine/assortiment.mdb")
	> cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=e:\-== 
n> exans ==-\shopfloor\shopfloor.mdb;"
	> Response.Expires = 0

> But when i put the databse on the server, my application cant open the 
d> atabase.
T> he database is located on the U disk.
E> verone has read and write rights to the mdb-file.

> Error Type:
M> icrosoft JET Database Engine (0x80004005)
T> he Microsoft Jet database engine cannot open the 
f> ile 'u:\apps\common\q_doc\shopfloor.mdb'. It is already opened 
e> xclusively by another user, or you need permission to view its data.

> thnx

> Vandael Tim
Message #5 by "Vandael Tim" <vandael_tim@h...> on Thu, 11 Apr 2002 12:20:20
Nope,

the access database is on a fileserver,
and the application is running on the intranet server.

To the dir u:\apps\common\q_doc\shopfloor.mdb have only 2 persons rights,
and the other one is sitting next to me, so that isn't the problem.

I guess it is something with the user-rights on the dir,
but i dont know more.

Thnx

Tim



> Does anyone else have access to this drive. If so then someone else 
could 
a> lso have the file open and this might be what is giving you the error.

> > This is my connection to my database.

> > Dim cnn1
	> > Set cnn1 = Server.CreateObject("ADODB.Connection")
	> > 'cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & 
S> > erver.MapPath ("/alpine/assortiment.mdb")
	> > cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=e:\-
== 
n> > exans ==-\shopfloor\shopfloor.mdb;"
	> > Response.Expires = 0

> > But when i put the databse on the server, my application cant open the 
d> > atabase.
T> > he database is located on the U disk.
E> > verone has read and write rights to the mdb-file.

> > Error Type:
M> > icrosoft JET Database Engine (0x80004005)
T> > he Microsoft Jet database engine cannot open the 
f> > ile 'u:\apps\common\q_doc\shopfloor.mdb'. It is already opened 
e> > xclusively by another user, or you need permission to view its data.

> > thnx

> > Vandael Tim
Message #6 by "Ajay" <ajayn@p...> on Thu, 11 Apr 2002 19:16:35 +0530
Also ensure that the server is correctly maping the file
("/alpine/assortiment.mdb).
I mean to say that the above path must be in your virtual directory.
Thanks,
----- Original Message -----
From: "Ken Schaefer" <ken@a...>
To: "Access ASP" <access_asp@p...>
Sent: Thursday, April 11, 2002 5:52 AM
Subject: [access_asp] Re: Path of the database ?


> Is the webserver running on the same machine as the database is located?
>
> Cheers
> Ken
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: "Vandael Tim" <vandael_tim@h...>
> Subject: [access_asp] Path of the database ?
>
>
> : Dim cnn1
> : Set cnn1 = Server.CreateObject("ADODB.Connection")
> : 'cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
> : Server.MapPath ("/alpine/assortiment.mdb")
> : cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=e:\-==
> : nexans ==-\shopfloor\shopfloor.mdb;"
> : Response.Expires = 0
> :
> : But when i put the databse on the server, my application cant open the
> : database.
> : The database is located on the U disk.
> : Everone has read and write rights to the mdb-file.
> :
> : Error Type:
> : Microsoft JET Database Engine (0x80004005)
> : The Microsoft Jet database engine cannot open the
> : file 'u:\apps\common\q_doc\shopfloor.mdb'. It is already opened
> : exclusively by another user, or you need permission to view its data.
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>

Message #7 by "Ken Schaefer" <ken@a...> on Fri, 12 Apr 2002 10:53:02 +1000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Vandael Tim" <vandael_tim@h...>
Subject: [access_asp] Re: Path of the database ?


: No Ken, the database is on a file-server located.
: The server is a win2K machine.
: I think it has something to do with the user rights.
: What users must have rights to the specified dir?
: Is this IUSR_SERVER-NAME or the one that logs on to the Server?
:
: Tim

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

You have two problems then. Remember that all DB and file access by IIS/ASP
is done using the anonymous internet account on the webserver (usually
IUSR_<machinename>) unless you are using Basic or NT authentication.

Firstly drive letters are only mapped for the logged on user, so if you
logon to the webserver and map the drive letter u: to a share on the
database that mapping is not available to the IUSR_<machinename> account,
only to your account. You need to use a UNC path instead:
\\server\share\db.mdb

Secondly, the IUSR_<machinename> account is a local account*, so you can't
give it permission to remote resources. You need to change the account to be
a domain account, and give that domain account appropriate permissions to
the remote share

Lastly, it is not advisable to connect to Access databases across a
network - performance will be abysmal since Access wasn't really designed as
a multi-user DBMS. It was designed as a single user, desktop database.

Cheers
Ken

* Does not apply when the webserver is running on a domain controller, as
there are no local accounts on a domain controller - only domain accounts.


  Return to Index