Ask a Question related to ASP Database, Design and Development.
-
Brad Pears #1
problems access an MS Access 2000 DB using ASP
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\m odels.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
Brad Pears Guest
-
Get the next ID - Access 2000
I'm sure that this topic is in here somewhere, but I couldn't find it. What is the best way to get the next ID in a table when adding a record? I... -
Access 2002 PDFWriter VBA Code w/WinXP does not work like Access 2000
I am trying to print an Access 2002 report (Windows XP OS) as a PDF. I had success with Access 2000 in a Windows 2000 environment, but as soon as I... -
from pdf 5 to access 2000
is there any way of going from a pdf5 file that contains names and addresses to an access file which should also have the same fields? Have tried... -
Access 2000 or SQL Server 2000
Hi I am planning to design a database (destined for the web) that will have between 20000 and 45000 records in it and will receive a lot of reads... -
Access 2000 to VB .Net
Hi, I have a Access 2000 application that I want to transfer to Visual Basic ..Net. I was wondering how I could take my Access 2000 forms, modules... -
Bob Barrows [MVP] #2
Re: problems access an MS Access 2000 DB using ASP
[url]http://www.aspfaq.com/5003[/url]
--
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.
Bob Barrows [MVP] Guest
-
McKirahan #3
Re: problems access an MS Access 2000 DB using ASP
"Brad Pears" <donotreply@notreal.com> wrote in message
news:u4r7hH2bEHA.3012@tk2msftngp13.phx.gbl...switched> Our graphic designer is developing our new company website. We haveis> 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 andOLE> 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--> connection string. However, each time she runs the ASP code she gets the
> following error...
>
> --------------------------------------------------------------------------system> --------
> 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--> administrator or the person who created this object establish the
> appropriate permissions for you.
>
> /NewFiles/db_simple2.asp, line 14
> --------------------------------------------------------------------------us> --------
>
> 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 informederror,> that it has been. I use Access here at work, and I can generate thisaccess> 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 fulltheir> to the DB. However, if our provider does not have Access installed onsystem.mdw> server - which they likely do not, then there would be no default--> 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...
>
> --------------------------------------------------------------------------";Provider=Microsoft.Jet.OLEDB.4.0;"> -----
> 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\m odels.mdb")
>
> cnnDB.Open "Data Source=" & strDBPath &>
> 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
>
If the database is in the same folder as the ASP page then try:
strDBPath = Server.MapPath ("models.mdb")
otherwise remove "Server.MapPath()" and try:
strDBPath = "E:\Files\LocalUser\truenorth\NewFiles\database\mo dels.mdb"
McKirahan Guest



Reply With Quote

