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

  1. #1

    Default 80040e10

    Below is my SQL statement which is embedded into my ASP
    page. When I Response.Write the SQL out and paste the
    output into Access, it works fine. But when I go to run
    it within my ASP (for the creation of a recordset), I get
    the following:

    Microsoft OLE DB Provider for ODBC Drivers
    error '80040e10'

    [Microsoft][ODBC Microsoft Access Driver] Too few
    parameters. Expected 1.

    /Architecture/shawn_test2.asp, line 228

    ************************
    sSQL = _

    "SELECT " & _
    "d_service_area.service_area AS ServiceArea, " & _
    "d_environment.environment AS Environment, " & _
    "d_platform_function.platform_function AS
    Platform, " & _
    "d_hw_type.hw_type AS hdwType, " & _
    "d_hardware.standard AS hdwHardware, " & _
    "d_hardware.config_vrsn AS hdwVersion, " & _
    "d_sw_type.sw_type AS sfwType, " & _
    "d_software.standard AS sfwSoftware, " & _
    "d_software.config_vrsn AS sfwVersion, " & _
    "hw_sw.time_frame AS tf, " & _
    "hw_sw.impl_plan_start_date AS pStDate, " & _
    "hw_sw.impl_act_start_date AS aStDate, " & _
    "hw_sw.impl_plan_duration AS pDur, " & _
    "0 AS cmtTyp, " & _
    "0 AS cmtSeq, " & _
    """ "" AS cmt " & _

    "FROM (d_service_area " & _
    "INNER JOIN (d_platform_function " & _
    "INNER JOIN (d_environment " & _
    "INNER JOIN sa_env_pf " & _
    "ON d_environment.environment_id =
    sa_env_pf.env_id) " & _
    "ON
    d_platform_function.platform_function_id =
    sa_env_pf.pf_id) " & _
    "ON d_service_area.service_area_id =
    sa_env_pf.sa_id) " & _
    "INNER JOIN (d_sw_type " & _
    "INNER JOIN (d_software " & _
    "INNER JOIN (d_hw_type " & _
    "INNER JOIN (d_hardware " & _
    "INNER JOIN hw_sw " & _
    "ON d_hardware.hardware_id =
    hw_sw.hardware_id) " & _
    "ON d_hw_type.hw_id =
    d_hardware.hw_type_id) " & _
    "ON d_software.software_id =
    hw_sw.software_id) " & _
    "ON d_sw_type.sw_id =
    d_software.sw_type_id) " & _
    "ON sa_env_pf.id = hw_sw.row_id_ref " & _

    "WHERE d_service_area.service_area
    = 'telephone_services' " & _

    "UNION ALL " & _

    "SELECT " & _
    "d_service_area.service_area AS ServiceArea, " & _
    "d_environment.environment AS Environment, " & _
    "d_platform_function.platform_function AS
    Platform, " & _
    "d_hw_type.hw_type AS hdwType, " & _
    "d_hardware.standard AS hdwHardware, " & _
    "d_hardware.config_vrsn AS hdwVersion, " & _
    "d_sw_type.sw_type AS sfwType, " & _
    "d_software.standard AS sfwSoftware, " & _
    "d_software.config_vrsn AS sfwVersion, " & _
    "hw_sw.time_frame AS tf, " & _
    """ "" AS pStDate, " & _
    """ "" AS aStDate, " & _
    """ "" AS pDur, " & _
    "1 AS cmtTyp, " & _
    "comments_main.comment_seq AS cmtSeq, " & _
    "comments_main.comment AS cmt " & _

    "FROM ((d_service_area " & _
    "INNER JOIN (d_platform_function " & _
    "INNER JOIN (d_environment " & _
    "INNER JOIN sa_env_pf " & _
    "ON d_environment.environment_id =
    sa_env_pf.env_id) " & _
    "ON
    d_platform_function.platform_function_id =
    sa_env_pf.pf_id) " & _
    "ON d_service_area.service_area_id =
    sa_env_pf.sa_id) " & _
    "INNER JOIN comments_main " & _
    "ON sa_env_pf.id = comments_main.row_id) "
    & _
    "INNER JOIN (d_sw_type " & _
    "INNER JOIN (d_software " & _
    "INNER JOIN (d_hw_type " & _
    "INNER JOIN (d_hardware " & _
    "INNER JOIN hw_sw " & _
    "ON d_hardware.hardware_id =
    hw_sw.hardware_id) " & _
    "ON d_hw_type.hw_id =
    d_hardware.hw_type_id) " & _
    "ON d_software.software_id =
    hw_sw.software_id) " & _
    "ON d_sw_type.sw_id =
    d_software.sw_type_id) " & _
    "ON sa_env_pf.id = hw_sw.row_id_ref " & _

    "WHERE d_service_area.service_area
    = 'telephone_services' " & _

    "UNION ALL " & _

    "SELECT " & _
    "d_service_area.service_area AS ServiceArea, " & _
    "d_environment.environment AS Environment, " & _
    "d_platform_function.platform_function AS
    Platform, " & _
    "d_hw_type.hw_type AS hdwType, " & _
    "d_hardware.standard AS hdwHardware, " & _
    "d_hardware.config_vrsn AS hdwVersion, " & _
    "d_sw_type.sw_type AS sfwType, " & _
    "d_software.standard AS sfwSoftware, " & _
    "d_software.config_vrsn AS sfwVersion, " & _
    "hw_sw.time_frame AS tf, " & _
    """ "" AS pStDate, " & _
    """ "" AS aStDate, " & _
    """ "" AS pDur, " & _
    "2 AS cmtTyp, " & _
    "comments_impl.comment_seq AS cmtSeq, " & _
    "comments_impl.comment AS cmt " & _

    "FROM (d_service_area " & _
    "INNER JOIN (d_platform_function " & _
    "INNER JOIN (d_environment " & _
    "INNER JOIN sa_env_pf " & _
    "ON d_environment.environment_id =
    sa_env_pf.env_id) " & _
    "ON
    d_platform_function.platform_function_id =
    sa_env_pf.pf_id) " & _
    "ON d_service_area.service_area_id =
    sa_env_pf.sa_id) " & _
    "INNER JOIN ((d_sw_type " & _
    "INNER JOIN (d_software " & _
    "INNER JOIN (d_hw_type " & _
    "INNER JOIN (d_hardware " & _
    "INNER JOIN hw_sw " & _
    "ON d_hardware.hardware_id =
    hw_sw.hardware_id) " & _
    "ON d_hw_type.hw_id =
    d_hardware.hw_type_id) " & _
    "ON d_software.software_id =
    hw_sw.software_id) " & _
    "ON d_sw_type.sw_id =
    d_software.sw_type_id) " & _
    "INNER JOIN comments_impl " & _
    "ON hw_sw.id = comments_impl.row_id) " & _
    "ON sa_env_pf.id = hw_sw.row_id_ref " & _

    "WHERE d_service_area.service_area
    = 'telephone_services' " & _

    "UNION ALL " & _

    "SELECT " & _
    "d_service_area.service_area AS ServiceArea, " & _
    "d_environment.environment AS Environment, " & _
    "d_platform_function.platform_function AS
    Platform, " & _
    "d_hw_type.hw_type AS hdwType, " & _
    "d_hardware.standard AS hdwHardware, " & _
    "d_hardware.config_vrsn AS hdwVersion, " & _
    "d_sw_type.sw_type AS sfwType, " & _
    "d_software.standard AS sfwSoftware, " & _
    "d_software.config_vrsn AS sfwVersion, " & _
    "hw_sw.time_frame AS tf, " & _
    """ "" AS pStDate, " & _
    """ "" AS aStDate, " & _
    """ "" AS pDur, " & _
    "3 AS cmtTyp, " & _
    "comments_hdw.comment_seq AS cmtSeq, " & _
    "comments_hdw.comment AS cmt " & _

    "FROM (d_service_area " & _
    "INNER JOIN (d_platform_function " & _
    "INNER JOIN (d_environment " & _
    "INNER JOIN sa_env_pf " & _
    "ON d_environment.environment_id =
    sa_env_pf.env_id) " & _
    "ON
    d_platform_function.platform_function_id =
    sa_env_pf.pf_id) " & _
    "ON d_service_area.service_area_id =
    sa_env_pf.sa_id) " & _
    "INNER JOIN (d_sw_type " & _
    "INNER JOIN (d_software " & _
    "INNER JOIN (d_hw_type " & _
    "INNER JOIN ((d_hardware " & _
    "INNER JOIN comments_hdw " & _
    "ON d_hardware.hardware_id =
    comments_hdw.row_id) " & _
    "INNER JOIN hw_sw " & _
    "ON d_hardware.hardware_id =
    hw_sw.hardware_id) " & _
    "ON d_hw_type.hw_id =
    d_hardware.hw_type_id) " & _
    "ON d_software.software_id =
    hw_sw.software_id) " & _
    "ON d_sw_type.sw_id =
    d_software.sw_type_id) " & _
    "ON sa_env_pf.id = hw_sw.row_id_ref " & _

    "WHERE d_service_area.service_area
    = 'telephone_services' " & _

    "UNION ALL SELECT " & _
    "d_service_area.service_area AS ServiceArea, " &
    _
    "d_environment.environment AS Environment, " & _
    "d_platform_function.platform_function AS
    Platform, " & _
    "d_hw_type.hw_type AS hdwType, " & _
    "d_hardware.standard AS hdwHardware, " & _
    "d_hardware.config_vrsn AS hdwVersion, " & _
    "d_sw_type.sw_type AS sfwType, " & _
    "d_software.standard AS sfwSoftware, " & _
    "d_software.config_vrsn AS sfwVersion, " & _
    "hw_sw.time_frame AS tf, " & _
    """ "" AS pStDate, " & _
    """ "" AS aStDate, " & _
    """ "" AS pDur, " & _
    "4 AS cmtTyp, " & _
    "comments_sftw.comment_seq AS cmtSeq, " & _
    "comments_sftw.comment AS cmt " & _

    "FROM (d_service_area " & _
    "INNER JOIN (d_platform_function " & _
    "INNER JOIN (d_environment " & _
    "INNER JOIN sa_env_pf " & _
    "ON d_environment.environment_id =
    sa_env_pf.env_id) " & _
    "ON
    d_platform_function.platform_function_id =
    sa_env_pf.pf_id) " & _
    "ON d_service_area.service_area_id =
    sa_env_pf.sa_id) " & _
    "INNER JOIN (d_sw_type " & _
    "INNER JOIN ((d_software " & _
    "INNER JOIN comments_sftw " & _
    "ON d_software.software_id =
    comments_sftw.row_id) " & _
    "INNER JOIN (d_hw_type " & _
    "INNER JOIN (d_hardware " & _
    "INNER JOIN hw_sw " & _
    "ON d_hardware.hardware_id =
    hw_sw.hardware_id) " & _
    "ON d_hw_type.hw_id =
    d_hardware.hw_type_id) " & _
    "ON d_software.software_id =
    hw_sw.software_id) " & _
    "ON d_sw_type.sw_id =
    d_software.sw_type_id) " & _
    "ON sa_env_pf.id = hw_sw.row_id_ref " & _

    "WHERE d_service_area.service_area
    = 'telephone_services' " & _

    "ORDER BY Environment, Platform, hdwType,
    hdwHardware, hdwVersion, sfwType, sfwSoftware, sfwVersion,
    tf, cmtTyp" & ";"
    ********************
    Line 228 = rsSA.Open sSQL

    Any help is greatly appreciated.
    Shawn Guest

  2. Similar Questions and Discussions

    1. JET error '80040e10' from Access 2000 query
      I wrote this query in Access 2000 the query has no parameters, however when I run it on IIS 5.0 it flakes out. Here is the code: 07 Set Postings...
  3. #2

    Default Re: 80040e10

    Shawn wrote:
    > Below is my SQL statement which is embedded into my ASP
    > page. When I Response.Write the SQL out and paste the
    > output into Access, it works fine. But when I go to run
    > it within my ASP (for the creation of a recordset), I get
    > the following:
    >
    > Microsoft OLE DB Provider for ODBC Drivers
    > error '80040e10'
    >
    > [Microsoft][ODBC Microsoft Access Driver] Too few
    > parameters. Expected 1.
    >
    Since it runs in Access but not from ASP, there are two possibilities:
    1. You've used * for the wildcard in a LIKE comparison. The ADO wildcard is
    %. However, a quick look shows that this is not the case, so ...

    2. You've used a reserved keyword for one or more of your table or column
    names. See here [url]http://www.aspfaq.com/show.asp?id=2080[/url] for the list of words
    that should be avoided. If you find you've made the mistake of using a
    keyword, you have 3 options:

    a) Change the name of the column or table
    b) If you can't change the name for some reason, you will need to remember
    to bracket [] that name whenever you use it in a query run via ADO
    c) Use the sql to create a saved query in Access, and run the saved query
    instead of using dynamic sql.

    My preferences in order would be c, the a, thenb.

    HTH,
    Bob Barrows
    --
    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 Guest

  4. #3

    Default Re: 80040e10

    Could also be the doubled-up double quotes. I know that wouldn't parse
    correctly in SQL Server with an incorrect QUOTED_IDENTIFIER setting. All
    strings in your SQL statement should be delimited by ' not " ... also, are
    all those UNION ALLs really necessary???

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




    "Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message
    news:enMQjb52DHA.3936@TK2MSFTNGP11.phx.gbl...
    > Shawn wrote:
    > > Below is my SQL statement which is embedded into my ASP
    > > page. When I Response.Write the SQL out and paste the
    > > output into Access, it works fine. But when I go to run
    > > it within my ASP (for the creation of a recordset), I get
    > > the following:
    > >
    > > Microsoft OLE DB Provider for ODBC Drivers
    > > error '80040e10'
    > >
    > > [Microsoft][ODBC Microsoft Access Driver] Too few
    > > parameters. Expected 1.
    > >
    >
    > Since it runs in Access but not from ASP, there are two possibilities:
    > 1. You've used * for the wildcard in a LIKE comparison. The ADO wildcard
    is
    > %. However, a quick look shows that this is not the case, so ...
    >
    > 2. You've used a reserved keyword for one or more of your table or column
    > names. See here [url]http://www.aspfaq.com/show.asp?id=2080[/url] for the list of
    words
    > that should be avoided. If you find you've made the mistake of using a
    > keyword, you have 3 options:
    >
    > a) Change the name of the column or table
    > b) If you can't change the name for some reason, you will need to remember
    > to bracket [] that name whenever you use it in a query run via ADO
    > c) Use the sql to create a saved query in Access, and run the saved query
    > instead of using dynamic sql.
    >
    > My preferences in order would be c, the a, thenb.
    >
    > HTH,
    > Bob Barrows
    > --
    > 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.
    >
    >

    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