database error.... plz explain..

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

  1. #1

    Default database error.... plz explain..

    I'm new at ASP. I'm trying to access some info out of an access
    database and i get this error. I've set up the ODBC correctly (I
    think), so I'm not sure what's causing this error...Any Ideas would be
    appreciated.

    w i l l

    -----ERROR------
    Technical Information (for support personnel)

    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
    [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
    1.
    /asp/database.asp, line 20


    Browser Type:
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)

    Page:
    GET /asp/database.asp

    -----ERROR---------


    CODE-------------------------------BELOW-----------------

    <%@ LANGUAGE="JavaScript" %>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

    <html>
    <head>
    <title>database.asp</title>
    </head>
    <body>

    <table border="1">
    <tr>

    <th>ID</th><th>Name</th><th>Address</th><th>City</th><th>Zip</th><th>Phone</th>
    </tr>

    <%
    var adoConnection = Server.CreateObject("ADODB.Connection");
    adoConnection.Open("DSN=Address");
    var SQL = "SELECT ID,Name,Address,City,Zip,Phone FROM addressTable";
    var adoRecordSet = adoConnection.Execute(SQL);
    while (adoRecordSet.Eof == false) {
    %>

    <tr>
    <td><%=adoRecordSet("ID").Value%></td>
    <td><%=adoRecordSet("Name").Value%></td>
    <td><%=adoRecordSet("Address").Value%></td>
    <td><%=adoRecordSet("City").Value%></td>
    <td><%=adoRecordSet("Zip").Value%></td>
    <td><%=adoRecordSet("Phone").Value%></td>
    </tr>

    <%
    adoRecordSet.MoveNext();

    //Close Record Set
    ado.RecordSet.Close();
    adoRecordSet = null;
    adoConnection.Close();
    adoConnection = null;
    }
    %>

    </table>
    </body>
    </html>

    w i l l Guest

  2. Similar Questions and Discussions

    1. Error after upgrade "Error Executing Database Query. "
      I have set up a new server with CF MX 6.1. I have moved code from a CF 5 server. Now I am getting a lot of errors like this one. They all vary...
    2. Hard to explain, has to do with users, last logged intime, and my database
      Okay everyone this is closly related to my other topic but they are different. I keep a field in my database called loggedin, which is set to yes if...
    3. Can someone explain this error to me? :(
      Hi! I can`t understand what php wants from me:( So: Cannot send session cache limiter - headers already sent (output started at...
    4. Can Someone Explain (No Pun Intended) this Explain Plan Output ?
      We're running DB2 v7.1 on OS/390. The DBA guys gave us a macro to generate an explain plan against a query that is stored in a PDS member. The...
    5. Searching a database .... query optimization (how do I read the explain on output?)
      I've got a more-or-less open search of the database in question, which works just fine, if you don't mind the upwards of 20+ seconds it takes to...
  3. #2

    Default Re: database error.... plz explain..

    Consider renaming some of your table fields:

    [url]http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q109/3/12.asp&NoWebContent=1[/url]

    tim


    "w i l l" <willis_31_40@yahoo.com> wrote in message
    news:kbtbgvkt31qjhch6v90nqhqjs4mfor0fnu@4ax.com...
    > I'm new at ASP. I'm trying to access some info out of an access
    > database and i get this error. I've set up the ODBC correctly (I
    > think), so I'm not sure what's causing this error...Any Ideas would be
    > appreciated.
    >
    > w i l l
    >
    > -----ERROR------
    > Technical Information (for support personnel)
    >
    > Error Type:
    > Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
    > [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
    > 1.
    > /asp/database.asp, line 20
    >
    >
    > Browser Type:
    > Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)
    >
    > Page:
    > GET /asp/database.asp
    >
    > -----ERROR---------
    >
    >
    > CODE-------------------------------BELOW-----------------
    >
    > <%@ LANGUAGE="JavaScript" %>
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    >
    > <html>
    > <head>
    > <title>database.asp</title>
    > </head>
    > <body>
    >
    > <table border="1">
    > <tr>
    >
    >
    <th>ID</th><th>Name</th><th>Address</th><th>City</th><th>Zip</th><th>Phone</
    th>
    > </tr>
    >
    > <%
    > var adoConnection = Server.CreateObject("ADODB.Connection");
    > adoConnection.Open("DSN=Address");
    > var SQL = "SELECT ID,Name,Address,City,Zip,Phone FROM addressTable";
    > var adoRecordSet = adoConnection.Execute(SQL);
    > while (adoRecordSet.Eof == false) {
    > %>
    >
    > <tr>
    > <td><%=adoRecordSet("ID").Value%></td>
    > <td><%=adoRecordSet("Name").Value%></td>
    > <td><%=adoRecordSet("Address").Value%></td>
    > <td><%=adoRecordSet("City").Value%></td>
    > <td><%=adoRecordSet("Zip").Value%></td>
    > <td><%=adoRecordSet("Phone").Value%></td>
    > </tr>
    >
    > <%
    > adoRecordSet.MoveNext();
    >
    > //Close Record Set
    > ado.RecordSet.Close();
    > adoRecordSet = null;
    > adoConnection.Close();
    > adoConnection = null;
    > }
    > %>
    >
    > </table>
    > </body>
    > </html>
    >

    Tim Williams Guest

  4. #3

    Default Re: database error.... plz explain..

    Make sure that IIS user has permission to the folder that has the access
    database

    "w i l l" <willis_31_40@yahoo.com> wrote in message
    news:kbtbgvkt31qjhch6v90nqhqjs4mfor0fnu@4ax.com...
    > I'm new at ASP. I'm trying to access some info out of an access
    > database and i get this error. I've set up the ODBC correctly (I
    > think), so I'm not sure what's causing this error...Any Ideas would be
    > appreciated.
    >
    > w i l l
    >
    > -----ERROR------
    > Technical Information (for support personnel)
    >
    > Error Type:
    > Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
    > [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
    > 1.
    > /asp/database.asp, line 20
    >
    >
    > Browser Type:
    > Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)
    >
    > Page:
    > GET /asp/database.asp
    >
    > -----ERROR---------
    >
    >
    > CODE-------------------------------BELOW-----------------
    >
    > <%@ LANGUAGE="JavaScript" %>
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    >
    > <html>
    > <head>
    > <title>database.asp</title>
    > </head>
    > <body>
    >
    > <table border="1">
    > <tr>
    >
    >
    <th>ID</th><th>Name</th><th>Address</th><th>City</th><th>Zip</th><th>Phone</
    th>
    > </tr>
    >
    > <%
    > var adoConnection = Server.CreateObject("ADODB.Connection");
    > adoConnection.Open("DSN=Address");
    > var SQL = "SELECT ID,Name,Address,City,Zip,Phone FROM addressTable";
    > var adoRecordSet = adoConnection.Execute(SQL);
    > while (adoRecordSet.Eof == false) {
    > %>
    >
    > <tr>
    > <td><%=adoRecordSet("ID").Value%></td>
    > <td><%=adoRecordSet("Name").Value%></td>
    > <td><%=adoRecordSet("Address").Value%></td>
    > <td><%=adoRecordSet("City").Value%></td>
    > <td><%=adoRecordSet("Zip").Value%></td>
    > <td><%=adoRecordSet("Phone").Value%></td>
    > </tr>
    >
    > <%
    > adoRecordSet.MoveNext();
    >
    > //Close Record Set
    > ado.RecordSet.Close();
    > adoRecordSet = null;
    > adoConnection.Close();
    > adoConnection = null;
    > }
    > %>
    >
    > </table>
    > </body>
    > </html>
    >

    Tammy B. Guest

  5. #4

    Default Re: database error.... plz explain..

    "w i l l" <willis_31_40@yahoo.com> wrote in message
    news:kbtbgvkt31qjhch6v90nqhqjs4mfor0fnu@4ax.com...
    > I'm new at ASP. I'm trying to access some info out of an access
    > database and i get this error. I've set up the ODBC correctly (I
    > think), so I'm not sure what's causing this error...Any Ideas would be
    > appreciated.
    >

    " (I think)" makes me suspect that you might not have set it up correctly.
    Using ODBC is a bad idea anyway, use a dsn-less connection instead:

    "Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source=C:\yourfolder\yourdb.mdb;Persist Security Info=False"

    --
    John Blessing
    [url]http://www.LbeHelpdesk.com[/url] - Help Desk software at affordable prices
    [url]http://www.free-helpdesk.com[/url] - Completely free help desk software !
    [url]http://www.lbetoolbox.com[/url] - Remove Duplicates from MS Outlook
    [url]http://www.lbesync.com[/url] - Synchronize two Outlook Personal Folders

    John Blessing Guest

  6. #5

    Default Re: database error.... plz explain..

    I agree with John, don't use a DSN. And try wrapping column names in
    [square brackets] since you are using at least one that is reserved...
    [url]http://www.aspfaq.com/2080[/url]

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

    Please reply in the newsgroups, but if you absolutely
    must reply via e-mail, please take out the TRASH.


    "w i l l" <willis_31_40@yahoo.com> wrote in message
    news:kbtbgvkt31qjhch6v90nqhqjs4mfor0fnu@4ax.com...
    > I'm new at ASP. I'm trying to access some info out of an access
    > database and i get this error. I've set up the ODBC correctly (I
    > think), so I'm not sure what's causing this error...Any Ideas would be
    > appreciated.
    >
    > w i l l
    >
    > -----ERROR------
    > Technical Information (for support personnel)
    >
    > Error Type:
    > Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
    > [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
    > 1.
    > /asp/database.asp, line 20
    >
    >
    > Browser Type:
    > Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)
    >
    > Page:
    > GET /asp/database.asp
    >
    > -----ERROR---------
    >
    >
    > CODE-------------------------------BELOW-----------------
    >
    > <%@ LANGUAGE="JavaScript" %>
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    >
    > <html>
    > <head>
    > <title>database.asp</title>
    > </head>
    > <body>
    >
    > <table border="1">
    > <tr>
    >
    >
    <th>ID</th><th>Name</th><th>Address</th><th>City</th><th>Zip</th><th>Phone</
    th>
    > </tr>
    >
    > <%
    > var adoConnection = Server.CreateObject("ADODB.Connection");
    > adoConnection.Open("DSN=Address");
    > var SQL = "SELECT ID,Name,Address,City,Zip,Phone FROM addressTable";
    > var adoRecordSet = adoConnection.Execute(SQL);
    > while (adoRecordSet.Eof == false) {
    > %>
    >
    > <tr>
    > <td><%=adoRecordSet("ID").Value%></td>
    > <td><%=adoRecordSet("Name").Value%></td>
    > <td><%=adoRecordSet("Address").Value%></td>
    > <td><%=adoRecordSet("City").Value%></td>
    > <td><%=adoRecordSet("Zip").Value%></td>
    > <td><%=adoRecordSet("Phone").Value%></td>
    > </tr>
    >
    > <%
    > adoRecordSet.MoveNext();
    >
    > //Close Record Set
    > ado.RecordSet.Close();
    > adoRecordSet = null;
    > adoConnection.Close();
    > adoConnection = null;
    > }
    > %>
    >
    > </table>
    > </body>
    > </html>
    >

    Aaron Bertrand [MVP] 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