B
Brad Pears
Our graphic designer is developing our new company website. We have switched
providers and currently she is working on the new website which currently
ressides on the new providers server as they support the ASP development
environment. Their server is a Win2K3 server.
She is writing an ASP module to connect to an MS Access 2000 database and is
having problems connecting. In this database there is only one table.
She has tried many different connection strings all to no avail and then
found from investigating that the best and fastest method is to use the OLE
connection string. However, each time she runs the ASP code she gets the
following error...
----------------------------------------------------------------------------
--------
Microsoft JET Database Engine error '80004005'
You do not have the necessary permissions to use the
'E:\Files\LocalUser\truenorth\NewFiles\models.mdb' object. Have your system
administrator or the person who created this object establish the
appropriate permissions for you.
/NewFiles/db_simple2.asp, line 14
----------------------------------------------------------------------------
--------
We have asked the provider to make sure that the NTFS file privs have been
set appropriately on the directory this db is in, and they have informed us
that it has been. I use Access here at work, and I can generate this error,
if I have forgotten to give a user "open/run" rights on the actual
database - using the 'Security' settings. But, we use a workgroup
information file (.mdw) file here at work. Typically if you do not specify
the workgroup file the default user of admin is used - which has full access
to the DB. However, if our provider does not have Access installed on their
server - which they likely do not, then there would be no default system.mdw
file - and then how would you connect to the db and get any privs at all?
Does anyone have any clue what might be happening here? Do we need to
specify a system file in the db connection string and also specify a
username/password to connect with? And, if so, does anyone have the proper
syntax for doing so?
The ASP code she is using is shown below...
----------------------------------------------------------------------------
-----
Dim cnnDB ' ADO connection
Dim rstDB ' ADO recordset
Dim strDBPath ' path to Access database (*.mdb) file
Set cnnDB = Server.CreateObject("ADODB.Connection")
Set rstDB = Server.CreateObject("ADODB.Recordset")
' path to Access 2000 database on Internet providers server
strDBPath = Server.MapPath
("E:\Files\LocalUser\truenorth\NewFiles\database\models.mdb")
cnnDB.Open "Data Source=" & strDBPath & ";Provider=Microsoft.Jet.OLEDB.4.0;"
Set rstDB = cnnDB.Execute("SELECT * FROM models")
Do While Not rstDB.EOF
rstSearch.Fields("modelfolder")
rstSearch.Fields("modeltotal")
rstSearch.Fields("modeltype")
rstDB.MoveNext
Loop
rstDb.Close
Set rstDB = Nothing
cnnDB.Close
Set cnnDB = Nothing
providers and currently she is working on the new website which currently
ressides on the new providers server as they support the ASP development
environment. Their server is a Win2K3 server.
She is writing an ASP module to connect to an MS Access 2000 database and is
having problems connecting. In this database there is only one table.
She has tried many different connection strings all to no avail and then
found from investigating that the best and fastest method is to use the OLE
connection string. However, each time she runs the ASP code she gets the
following error...
----------------------------------------------------------------------------
--------
Microsoft JET Database Engine error '80004005'
You do not have the necessary permissions to use the
'E:\Files\LocalUser\truenorth\NewFiles\models.mdb' object. Have your system
administrator or the person who created this object establish the
appropriate permissions for you.
/NewFiles/db_simple2.asp, line 14
----------------------------------------------------------------------------
--------
We have asked the provider to make sure that the NTFS file privs have been
set appropriately on the directory this db is in, and they have informed us
that it has been. I use Access here at work, and I can generate this error,
if I have forgotten to give a user "open/run" rights on the actual
database - using the 'Security' settings. But, we use a workgroup
information file (.mdw) file here at work. Typically if you do not specify
the workgroup file the default user of admin is used - which has full access
to the DB. However, if our provider does not have Access installed on their
server - which they likely do not, then there would be no default system.mdw
file - and then how would you connect to the db and get any privs at all?
Does anyone have any clue what might be happening here? Do we need to
specify a system file in the db connection string and also specify a
username/password to connect with? And, if so, does anyone have the proper
syntax for doing so?
The ASP code she is using is shown below...
----------------------------------------------------------------------------
-----
Dim cnnDB ' ADO connection
Dim rstDB ' ADO recordset
Dim strDBPath ' path to Access database (*.mdb) file
Set cnnDB = Server.CreateObject("ADODB.Connection")
Set rstDB = Server.CreateObject("ADODB.Recordset")
' path to Access 2000 database on Internet providers server
strDBPath = Server.MapPath
("E:\Files\LocalUser\truenorth\NewFiles\database\models.mdb")
cnnDB.Open "Data Source=" & strDBPath & ";Provider=Microsoft.Jet.OLEDB.4.0;"
Set rstDB = cnnDB.Execute("SELECT * FROM models")
Do While Not rstDB.EOF
rstSearch.Fields("modelfolder")
rstSearch.Fields("modeltotal")
rstSearch.Fields("modeltype")
rstDB.MoveNext
Loop
rstDb.Close
Set rstDB = Nothing
cnnDB.Close
Set cnnDB = Nothing