problems access an MS Access 2000 DB using ASP

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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...
    4. 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...
    5. 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...
  3. #2

    Default 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

  4. #3

    Default Re: problems access an MS Access 2000 DB using ASP

    "Brad Pears" <donotreply@notreal.com> wrote in message
    news:u4r7hH2bEHA.3012@tk2msftngp13.phx.gbl...
    > 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
    >

    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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139