Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Access 97 Database question


Message #1 by "Phil Perks" <philp@w...> on Tue, 27 Jun 2000 17:24:46
----Original Message-----

From: Constance M. Irwin [mailto:irwin@T...]

Sent: 27 June 2000 15:25

To: Phil Perks

Subject: Re: Access 97 Database question



Phil,



We have an IIS server where the code and the data, and Access 97 database, 

are currently residing. We would like to move the Access 97 database off 

onto an NT server . We have added the service account of the IIS server to 

the permissions list of the specified directory tree on the server where we 

would like the database to reside. We mapped a drive (h) on the IIS server 

to the share and directory tree on the NT server where the database 

resides. Both the IIS server and the NT server where the database reside 

are part of the same domain. We are using the following connect script:



<%

strConnect = "Provider=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};" & 

_

"DBQ=h:\psychdata\oraprd.mdb"

%>



When we try to access the database on the NT server  from the asp code, we 

get the following error:



Microsoft OLE DB Provider for ODBC Drivers error '8004005'



[Microsoft][ODBC MS Access 97 Driver]



and then, a message regarding permission. I have checked the permissions 

on

oraprd.mdb, and the account on the IIS box has permissions to the database. 

Any ideas?



Connie

Message #2 by smartin@c... on Wed, 28 Jun 2000 13:27:10 -0400
First, good luck accessing an Access database on a remote share via ODBC.

This has been the source of many a headache for many people in the past.



That said, at the simplest level, you're using a mapped drive letter in your

DBQ= statement.  Since mapped drives are a user property, not a system

property,  when ASP tries to connect to the MDB file it has no idea what the

H: drive is.  Recall that ASP runs in the context of the IUSR_machine or

IWAM_machinename account, not your account.  So, while you have an H: drive,

IUSR_ and IWAM_ have no idea what the H: drive is.  Rather than using a

drive mapping, you need to point to the UNC name of the share (i.e.

\\machinename\sharename\psychdata\oraprd.mdb.



The next hurdle you'll have to get over is the permissions game.  Once

you're using a UNC rather than a mapped drive, you probaly get an error

about permissions to get to the Access DB.  At this point, you'll want to

look at making the IUSR_ and IWAM_ domain accounts rather than local

accounts so that the SID for each account will be recognized on both

servers.



If you get this all to work, consider yourself lucky.  Then, if you've moved

Access to another machine because you think you'll get better performance,

be prepared to be disappointed.  Access, on the whole, is a lousy database

to use for multi-user Web environments.  Consider switching to a more robust

solution like MSDE or MS SQL.



-Stephen







> -----Original Message-----

> From: Phil Perks 

> Sent: Tuesday, June 27, 2000 1:25 PM

> To: ASP Databases

> Subject: [asp_databases] Access 97 Database question

> 

> 

> ----Original Message-----

> From: Constance M. Irwin [mailto:irwin@T...]

> Sent: 27 June 2000 15:25

> To: Phil Perks

> Subject: Re: Access 97 Database question

> 

> Phil,

> 

> We have an IIS server where the code and the data, and Access 

> 97 database, 

> are currently residing. We would like to move the Access 97 

> database off 

> onto an NT server . We have added the service account of the 

> IIS server to 

> the permissions list of the specified directory tree on the 

> server where we 

> would like the database to reside. We mapped a drive (h) on 

> the IIS server 

> to the share and directory tree on the NT server where the database 

> resides. Both the IIS server and the NT server where the 

> database reside 

> are part of the same domain. We are using the following 

> connect script:

> 

> <%

> strConnect = "Provider=MSDASQL;DRIVER={Microsoft Access 

> Driver (*.mdb)};" & 

> _

> "DBQ=h:\psychdata\oraprd.mdb"

> %>

> 

> When we try to access the database on the NT server  from the 

> asp code, we 

> get the following error:

> 

> Microsoft OLE DB Provider for ODBC Drivers error '8004005'

> 

> [Microsoft][ODBC MS Access 97 Driver]

> 

> and then, a message regarding permission. I have checked the 

> permissions 

> on

> oraprd.mdb, and the account on the IIS box has permissions to 

> the database. 

> Any ideas?

> 

> Connie

> 




  Return to Index