Error 80040e14 on connecting to database

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

  1. #1

    Default Error 80040e14 on connecting to database

    Any ideas??

    Here is the error I'm getting:
    <p>Microsoft OLE DB Provider for ODBC Drivers</font> <font
    face="Arial" size=2>error '80040e14'</font>
    <p>
    <font face="Arial" size=2>[Microsoft][ODBC Microsoft Access Driver]
    Unknown</font>


    Here is my code:
    <%@ language = "JavaScript" %>
    <% var strconnection = "DSN=Products;DATABASE=Products"; %>
    <head>
    <script language=JavaScript>
    <%
    var tbl="";
    var rs4 = Server.CreateObject("ADODB.Recordset");
    var sql = "SELECT DISTINCT stock, Name, Manuf, Price, Note, Retail,
    Image, Description FROM Products";

    rs4.Open(sql,strconnection);
    var n=0;
    while (!rs4.EOF)
    {
    var stk = rs4.Fields("stock").value;
    var nam = rs4.Fields("Name").value;
    var man = rs4.Fields("Manuf").value;
    var prc = rs4.Fields("Price").value;
    var not = rs4.Fields("Note").value;
    var ret = rs4.Fields("Retail").value;
    var img = rs4.Fields("Image").value;
    var dsc = rs4.Fields("Description").value;
    {

    var tbl = tbl += "<table WIDTH='700' border='0'>\n";
    {
    tbl += " <td WIDTH='150'>\n";
    tbl += (img) ? " <DIV ALIGN='CENTER'><IMG src='images/" +
    img + "' height='80'>\n" : "<DIV ALIGN='CENTER'><IMG
    src='images/nf.jpg' height='80'>";
    tbl += " </td>\n";
    tbl += "<TD width='250'>\n";
    tbl += (nam) ? "" + nam + "\n" : "";
    tbl += (man) ? "" + man + "\n" : "";
    tbl += " </td>\n";
    tbl += "<TD width='100'>\n";
    tbl += (prc) ? "" + prc + "\n" : "CALL";
    tbl += " </td>\n";
    tbl += "<TD width='200'>\n";
    tbl += (not) ? "<p><font color='#FF0000'><strong>" + not +
    "</strong></font></p>\n" : "";
    tbl += (ret) ? "<p><strong>Retail Price:" + ret + "\n" : "";
    tbl += " </td>\n";
    tbl += " </tr><tr>\n";
    tbl += (dsc) ? " <td COLSPAN='4'><p><strong><font size='" + -1 +
    "'>Description: </strong>" + dsc + "</font></p></td>\n" : "";
    }
    tbl += "</table><hr>\n";
    }

    rs4.MoveNext();
    n++;
    }

    rs4.Close();
    Response.Write("document.repForm.write('" + tbl + "')")

    %>

    </script>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1"></head>
    <html>
    <BODY>
    <hr SIZE=4>
    <table>
    <td WIDTH='347' bgcolor="#0066FF"><div
    align="center"><strong>Product</strong></div></td>
    <td WIDTH='350' bgcolor="#0066FF"><div
    align="center"><strong>Price</strong></div></td>
    </table>
    <%=tbl%>
    </BODY>
    </HTML>
    Jeremy Guest

  2. Similar Questions and Discussions

    1. Error connecting to DB2 Sample database
      I've just installed DB2 Personal Edition V8 and managed to get the sample database created etc. However, when I attempt to connect to it in the CF...
    2. 800a01ad error when connecting to database in ASP.
      I have developed a simple ASP/VBScript application to allow a school IT coordinator to keep tabs on what software is installed on various PCs...
    3. JET Database Engine error '80040e14'
      I've got a query command that is checking a field name against it's value. The query is pulling from an Access 2000 DB. Here's the script: ...
    4. #10316 [Com]: error in connecting to MS access database
      ID: 10316 Comment by: subisiva at yahoo dot com Reported By: thomasj at cs dot uidaho dot edu Status: Closed...
    5. Error connecting to Access database
      Created new page, selected dynamic page and ASP VBscript from dynamic page list. In defining custome connection string, in connection string field,...
  3. #2

    Default Re: Error 80040e14 on connecting to database

    > <% var strconnection = "DSN=Products;DATABASE=Products"; %>

    Where did you get this syntax? Why are you using an ODBC DSN? Please see
    [url]http://www.aspfaq.com/2126[/url]
    > var rs4 = Server.CreateObject("ADODB.Recordset");
    Why are you using an explicit ADODB.Recordset? Please see
    [url]http://www.aspfaq.com/2191[/url]

    Also, by naming this object rs4, I take it you have four separate recordset
    objects in this page? Why?
    > var sql = "SELECT DISTINCT stock, Name, Manuf, Price, Note, Retail,
    > Image, Description FROM Products";
    Why are you using DISTINCT here? Do you really have duplicates in the
    table? Have you ever heard of a primary key? Please see
    [url]http://www.aspfaq.com/2504[/url]

    (I also plan to write an article on the perils of not having a primary key,
    and why DISTINCT should never be necessary in a properly designed system).

    --
    Aaron Bertrand
    SQL Server MVP
    [url]http://www.aspfaq.com/[/url]


    Aaron Bertrand - MVP Guest

  4. #3

    Default Re: Error 80040e14 on connecting to database

    "Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message news:<e5ItW9RMEHA.2064@TK2MSFTNGP12.phx.gbl>...
    > > <% var strconnection = "DSN=Products;DATABASE=Products"; %>
    >
    > Where did you get this syntax? Why are you using an ODBC DSN? Please see
    > [url]http://www.aspfaq.com/2126[/url]
    The file structure in the ISP's Server is set up as a UNIX server
    would be (even though it is a windows server) thus the physical path
    option wasn't working.

    >
    > > var rs4 = Server.CreateObject("ADODB.Recordset");
    >
    > Why are you using an explicit ADODB.Recordset? Please see
    > [url]http://www.aspfaq.com/2191[/url]
    >
    > Also, by naming this object rs4, I take it you have four separate recordset
    > objects in this page? Why?
    >
    This code was truncated...
    > > var sql = "SELECT DISTINCT stock, Name, Manuf, Price, Note, Retail,
    > > Image, Description FROM Products";
    >
    > Why are you using DISTINCT here? Do you really have duplicates in the
    > table? Have you ever heard of a primary key? Please see
    > [url]http://www.aspfaq.com/2504[/url]
    >
    I wanted to avoid any duplicates in the table
    > (I also plan to write an article on the perils of not having a primary key,
    > and why DISTINCT should never be necessary in a properly designed system).
    Still getting the error though even if I make these changes. Does
    anyone know the reserved words...I think the 'NAME' table header is
    reserved so I need to change that, but any others?

    Thanks!

    Jeremy
    Jeremy Guest

  5. #4

    Default Re: Error 80040e14 on connecting to database

    > The file structure in the ISP's Server is set up as a UNIX server
    > would be (even though it is a windows server) thus the physical path
    > option wasn't working.
    What on earth are you talking about? "as a UNIX server would be"?
    > I wanted to avoid any duplicates in the table
    My question was more along the lines of, why are there duplicates in the
    table in the first place? (AGain, have you heard of a primary key?)
    > Still getting the error though even if I make these changes.
    WHAT changes?
    > Does anyone know the reserved words...
    [url]http://www.aspfaq.com/2080[/url]

    --
    Aaron Bertrand
    SQL Server MVP
    [url]http://www.aspfaq.com/[/url]


    Aaron Bertrand - MVP Guest

  6. #5

    Default Re: Error 80040e14 on connecting to database

    "Jeremy" <jeremy_zifchock@yahoo.com> wrote in message
    news:f9d85033.0405040541.6f48b2c5@posting.google.c om...
    > The file structure in the ISP's Server is set up as a UNIX server
    > would be (even though it is a windows server) thus the physical path
    > option wasn't working.
    The physical path will still work,...you just have to find out what it is.
    Since it is an ISP's server it is most likely that you MDB file is within
    the web path.

    Create a simple ASP page containing this:

    Response.write Application("APPL_PHYSICAL_PATH") & <br>

    FTP it to the ISP's server where your site is.
    Then go to it in your browser and it will show the path on the server the
    Website is located in.

    The folder the MDB is in and the file itself must have Read/Write
    Permissions for the local "IUSR_<servername>" user account set in the NTFS
    permissions. There is nothing that can be "UNIX'ized" about that,...those
    permission must be set.

    --

    Phillip Windell [MCP, MVP, CCNA]
    [url]www.wandtv.com[/url]


    Phillip Windell Guest

  7. #6

    Default Re: Error 80040e14 on connecting to database

    You can grap an ASP file I have that will give you that and other
    information about a server when you FTP it to a server and open it with a
    browser.

    You can get it at [url]http://209.16.209.141/debug.zip[/url]


    --

    Phillip Windell [MCP, MVP, CCNA]
    [url]www.wandtv.com[/url]


    "Phillip Windell" <@.> wrote in message
    news:eGei5nfMEHA.1608@TK2MSFTNGP12.phx.gbl...
    > "Jeremy" <jeremy_zifchock@yahoo.com> wrote in message
    > news:f9d85033.0405040541.6f48b2c5@posting.google.c om...
    > > The file structure in the ISP's Server is set up as a UNIX server
    > > would be (even though it is a windows server) thus the physical path
    > > option wasn't working.
    >
    > The physical path will still work,...you just have to find out what it is.
    > Since it is an ISP's server it is most likely that you MDB file is within
    > the web path.
    >
    > Create a simple ASP page containing this:
    >
    > Response.write Application("APPL_PHYSICAL_PATH") & <br>
    >
    > FTP it to the ISP's server where your site is.
    > Then go to it in your browser and it will show the path on the server the
    > Website is located in.
    >
    > The folder the MDB is in and the file itself must have Read/Write
    > Permissions for the local "IUSR_<servername>" user account set in the NTFS
    > permissions. There is nothing that can be "UNIX'ized" about that,...those
    > permission must be set.
    >
    > --
    >
    > Phillip Windell [MCP, MVP, CCNA]
    > [url]www.wandtv.com[/url]
    >
    >

    Phillip Windell 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