Error reading from Access Database

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

  1. #1

    Default Error reading from Access Database

    Hi Folks

    Actually I am new to ASP, I will be thankful so much if anyone could help

    I have an Access2000 Database, I have Listing.html that has links to several
    ASP Pages, I pass a variable to ASP, And according to variable value I open
    the database and get its value

    The problem is that sometimes it works fine and sometimes it doesn't

    here is the code

    <%


    DBFilePath= Server.MapPath("pse.mdb")

    'the connection string to be passed to the Connection Object

    DBConnString = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & DBFilePath
    & ""

    'instanciate a connection oobject

    Set connObj = Server.CreateObject("ADODB.Connection")

    'Open the connection

    connObj.open DBConnString

    %>


    ========== code at the end of asp
    </center></div>

    <%

    'free recordset object memory location and close database connection

    RS.Close()

    Set RS = Nothing


    connObj.close()

    set connObj = Nothing

    %>

    </body>

    mostly it gives an error Internal Error, and after several trying I found
    the error on this line connObj.open DBConnString, But the page works fine
    sometimes and doesn't on another tries

    Thank You
    Mohammed Dwaikat


    Mohammed AM Dwaikat Guest

  2. Similar Questions and Discussions

    1. #13020 [NoF->Csd]: Error when reading data from Interbase 6 database
      ID: 13020 Updated by: abies@php.net Reported By: lpap at forthnet dot gr -Status: No Feedback +Status: ...
    2. Reading an MS Access Database file on *NIX platform using PHP
      I'm building a small web application for a friend using PHP. He'd like to use MS Access to keep the data in, and update the data on the site by...
    3. [PHP] Reading an MS Access Database file on *NIX platform using PHP
      On Sun, 24 Aug 2003 14:54:41 -0400 (EDT), you wrote: Suggestion: go backwards. Set up the data in, say, MySQL with an ODBC driver, and use...
    4. [PHP] Reading an MS Access Database file on *NIX platformusing PHP
      At 03:18 25.08.2003, Weston Cann said: ---------------------------------------- ---------------------------------------- You could do that...
    5. Error reading from Access
      In a web anabled program we want to read some info of a user. Therefore we wrote Private Sub ReadUser(ByVal Username As String) 'Step by step...
  3. #2

    Default Re: Error reading from Access Database

    1. Change from that ODBC connection string to an OLEDB connection string.
    ([url]www.connectionstrings.com[/url])
    2. Turn off friendly errors: [url]http://www.aspfaq.com/show.asp?id=2109[/url]

    If you still get an error, you'll see what the actual error is then. Post
    that here if you can't figure out how to fix it.

    Ray at work

    "Mohammed AM Dwaikat" <dwaikat@maktoob.com> wrote in message
    news:OqOF5j2KEHA.2456@TK2MSFTNGP12.phx.gbl...
    >
    > The problem is that sometimes it works fine and sometimes it doesn't
    >
    > here is the code
    >
    > <%
    >
    > DBConnString = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" &
    DBFilePath
    >
    > mostly it gives an error Internal Error

    Ray at Guest

  4. #3

    Default Re: Error reading from Access Database

    Highly appreciated for you, It works good, Thanks too much.


    Mohammed AM Dwaikat
    "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
    message news:ubw78n6KEHA.3012@tk2msftngp13.phx.gbl...
    > 1. Change from that ODBC connection string to an OLEDB connection string.
    > ([url]www.connectionstrings.com[/url])
    > 2. Turn off friendly errors: [url]http://www.aspfaq.com/show.asp?id=2109[/url]
    >
    > If you still get an error, you'll see what the actual error is then. Post
    > that here if you can't figure out how to fix it.
    >
    > Ray at work
    >
    > "Mohammed AM Dwaikat" <dwaikat@maktoob.com> wrote in message
    > news:OqOF5j2KEHA.2456@TK2MSFTNGP12.phx.gbl...
    >
    > >
    > > The problem is that sometimes it works fine and sometimes it doesn't
    > >
    > > here is the code
    > >
    > > <%
    > >
    > > DBConnString = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" &
    > DBFilePath
    > >
    > > mostly it gives an error Internal Error
    >
    >

    Mohammed AM Dwaikat 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