Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access ASP
|
Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 19th, 2004, 06:07 PM
Registered User
 
Join Date: Feb 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error:0x80040E10 -Too few parameters. expected 1

Hi all! I have an ASP page that i've added some drop-down fields to, which then posts the data to a database.It all works fine, except when i try to retrive the data so the user can view/edit it, I get the above error message. The section containing the line (302) it refers to is below, any ideas greatly appreciated.
M.

<tr>
        <td bgcolor=F0F0F0 align=right valign=top>*<B>
        <%=wc_VP_Region%>
        </b></td>
        <td bgcolor=F0F0F0 align=left>
        <select name=VP_Region size=1>
        <option value="">Select a Region</option>

<%
    set conntemp=server.createobject("adodb.connection")
    conntemp.open myDSN

        mySQL="select * from vp_region"

**This is line 302** set rstemp=conntemp.execute(mySQL)

    ' Check to see if any records are returned
    ' if none found then login fails.
    If rstemp.eof then ' Check to see any cases exist
        response.write "<Option>No categories found</option>"
    Else

        Do While rstemp.EOF <> True

        ' Open up a second record set and see if user has any Categories already defined
        If vp_region <> "" Then

            mySQL2="select * from vp_region where Customer_ID = '" & Customer_ID & "' AND region = " & rstemp("ID")

            set rstemp2=conntemp.execute(mySQL2)
            If rstemp2.EOF = True then ' Category not set for this customer

        %>
                <Option value=<%=rstemp("ID")%>>
                <%=rstemp("region")%>
                </option>

            <%else ' Set for this customer so add selected %>
            response.write <Option value=<%=rstemp("ID")%> SELECTED>
                <%=rstemp("region")%>
                </option>

            <%End If %>

    <%
            ' Close this record set
            rstemp2.Close ' Close this record set

        Else ' When Customer_ID = ""

    %>

        <Option value=<%=rstemp("ID")%>>
        <%=rstemp("region")%>
        </option>

            <% End If %>

<%
            rstemp.movenext
        loop

    End IF

    rstemp.close
    set rstemp=nothing
    conntemp.close ' Close the connection
    set conntemp=nothing

    %>

        </select>
        </td></tr>



 
Old December 3rd, 2004, 08:35 PM
Authorized User
 
Join Date: Sep 2003
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Have you tried Response,write for some of your variables ie:

<%
    set conntemp=server.createobject("adodb.connection")
    conntemp.open myDSN

        mySQL="select * from vp_region"
       Response.write mySQL
     response.end
%>
To stop the script before the error and help make sure your SQL statement is correct

Just a thought

Topshed

 
Old December 5th, 2004, 10:31 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Looks like customer_Id doesn't contain data. Check that with response.write, also the do the same for the second SQL statement. That should solve your problem.

Cheers!

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Type: (0x80040E10) InsouciantCoquette Classic ASP Databases 8 February 24th, 2006 12:13 AM
too few parameters expected 1 jim11 Access VBA 1 December 7th, 2005 03:41 PM
too few parameters expected n desprate Access VBA 6 April 29th, 2005 06:33 AM
Error "Too Few Parameters - Expected 1" timmaher Access VBA 2 August 31st, 2004 04:04 AM
Too few parameters. Expected 1. harry_barry Classic ASP Databases 2 May 26th, 2004 04:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.