asp calling access database

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

  1. #1

    Default asp calling access database

    We have an intranet running. asp page making a call to an access 2k
    database. When running, we get the following error.

    Any ideas on where and what to do to troubleshoot and repair it?

    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Microsoft Access Driver] Disk or network error.
    /default.asp, line 20


    Browser Type:
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

    Page:
    GET /default.asp

    -----
    Code is as follows (line 20 is ConnObj.Open "DBQ="
    :
    Set ConnObj = Server.CreateObject("ADODB.Connection")
    ConnObj.ConnectionTimeout = 15
    ConnObj.CommandTimeout = 30

    ConnObj.Open "DBQ=" & Server.MapPath("treasuries.mdb") &
    ";Driver={Microsoft Access Driver
    (*.mdb)};DriverId=25;MaxBufferSize=8192;Threads=20 ;", "sa", "sa"

    Set CmdObj = Server.CreateObject("ADODB.Command")
    CmdObj.ActiveConnection = ConnObj


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Horhayson Guest

  2. Similar Questions and Discussions

    1. Calling URL from a database
      I have the following code for a process page: ==================================================== <cfparam name="APPLICATION.A" default="A"...
    2. problem calling by unique id from database in php
      ok, so I have this code: a href=search.php?ID=",$i," (I took out the greater than less than cause I don't know how it would show up in some...
    3. Access denied when calling COM component.
      Hello, I try to convert a VB6 application to an ASP Web application. This application uses a COM component to access data on a remote server. ...
    4. Access calling another application
      Is there any way for Access to call an instance of IE or Word but keep it within a form, I know how to make it call IE or Word what I need is to...
    5. Calling an Access macro from an ASP page?
      OK.. another DB interaction question.. using VBScript and ASP, how can I trigger a macro in an Access database from a webpage? Anyone? Anyone?
  3. #2

    Default Re: asp calling access database

    first put in

    response.write Server.MapPath("treasuries.mdb")

    before the attempt to open the db and verify that it is a valid path and
    file.

    --
    Mark Schupp
    --
    Head of Development
    Integrity eLearning
    Online Learning Solutions Provider
    [email]mschupp@ielearning.com[/email]
    [url]http://www.ielearning.com[/url]
    714.637.9480 x17


    "Horhayson" <dgeorges.1@netzero.com> wrote in message
    news:OHKxUf9eDHA.368@TK2MSFTNGP12.phx.gbl...
    > We have an intranet running. asp page making a call to an access 2k
    > database. When running, we get the following error.
    >
    > Any ideas on where and what to do to troubleshoot and repair it?
    >
    > Error Type:
    > Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    > [Microsoft][ODBC Microsoft Access Driver] Disk or network error.
    > /default.asp, line 20
    >
    >
    > Browser Type:
    > Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
    >
    > Page:
    > GET /default.asp
    >
    > -----
    > Code is as follows (line 20 is ConnObj.Open "DBQ="
    > :
    > Set ConnObj = Server.CreateObject("ADODB.Connection")
    > ConnObj.ConnectionTimeout = 15
    > ConnObj.CommandTimeout = 30
    >
    > ConnObj.Open "DBQ=" & Server.MapPath("treasuries.mdb") &
    > ";Driver={Microsoft Access Driver
    > (*.mdb)};DriverId=25;MaxBufferSize=8192;Threads=20 ;", "sa", "sa"
    >
    > Set CmdObj = Server.CreateObject("ADODB.Command")
    > CmdObj.ActiveConnection = ConnObj
    >
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!

    Mark Schupp Guest

  4. #3

    Default Re: asp calling access database

    I put in the code as Mark suggested, and now get the following error:

    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Microsoft Access Driver] Could not find file
    '(unknown)'.
    /default.asp, line 21


    I wonder if it is a permissions problem with IIS and/or the file
    "treasuries.mdb"? To the best of my knowledge, nothing has changed
    either code-wise or permissions-wise. I did change the "domain
    administrator" password a week or two ago, but I honestly don't think
    that that is the problem, or is it?


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Horhayson Guest

  5. #4

    Default Re: asp calling access database

    Was the path that was written out valid?

    --
    Mark Schupp
    --
    Head of Development
    Integrity eLearning
    Online Learning Solutions Provider
    [email]mschupp@ielearning.com[/email]
    [url]http://www.ielearning.com[/url]
    714.637.9480 x17


    "Horhayson" <dgeorges.1@netzero.com> wrote in message
    news:eaQpd6EfDHA.1212@TK2MSFTNGP12.phx.gbl...
    > I put in the code as Mark suggested, and now get the following error:
    >
    > Error Type:
    > Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    > [Microsoft][ODBC Microsoft Access Driver] Could not find file
    > '(unknown)'.
    > /default.asp, line 21
    >
    >
    > I wonder if it is a permissions problem with IIS and/or the file
    > "treasuries.mdb"? To the best of my knowledge, nothing has changed
    > either code-wise or permissions-wise. I did change the "domain
    > administrator" password a week or two ago, but I honestly don't think
    > that that is the problem, or is it?
    >
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!

    Mark Schupp Guest

  6. #5

    Default Re: asp calling access database

    I still got the same error but on a different line (line 21 instead of
    line 20).

    The files "default.asp" and "treasuries.mdb" are contained within the
    same physical directory on a W2k server running IIS (if that helps)





    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Horhayson Guest

  7. #6

    Default Re: asp calling access database

    What does response.write server.mappath("treasuries.mdb") display?


    --
    Mark Schupp
    --
    Head of Development
    Integrity eLearning
    Online Learning Solutions Provider
    [email]mschupp@ielearning.com[/email]
    [url]http://www.ielearning.com[/url]
    714.637.9480 x17


    "Horhayson" <dgeorges.1@netzero.com> wrote in message
    news:OqG9cqGfDHA.2184@TK2MSFTNGP10.phx.gbl...
    > I still got the same error but on a different line (line 21 instead of
    > line 20).
    >
    > The files "default.asp" and "treasuries.mdb" are contained within the
    > same physical directory on a W2k server running IIS (if that helps)
    >
    >
    >
    >
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!

    Mark Schupp Guest

  8. #7

    Default Re: asp calling access database

    The path that it printed out was the valid path (i.e.
    c:\somefolder\treasuries.mdb). The code seems to check out just fine.
    The web page started working essentially without intervention from me (I
    did everything I could think of). Just chalk this one up to a
    "feature".

    Thanks for the assistance, though.



    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Horhayson 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