Ask a Question related to ASP Database, Design and Development.
-
Shawn #1
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
-
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... -
Bob Barrows #2
Re: 80040e10
Shawn wrote:
Since it runs in Access but not from ASP, there are two possibilities:> 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.
>
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
-
Aaron Bertrand [MVP] #3
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...is> 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 wildcardwords> %. 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> 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



Reply With Quote

