Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

too many arguments specified

Status
Not open for further replies.

Dimitrie1

Programmer
Jan 5, 2007
138
CA
I have an formview with an update template. When I click update I get the error message Procedure or function Web_UpdateFolderInfoAL_CCW has too many arguments specified

unfortunately, I don't have Query Profiler to trace it.

here's my asp datasource code
Code:
 <asp:SqlDataSource ID="dsInfos" runat="server" ConnectionString="<%$ ConnectionStrings:amanda_ConnectionString %>"
            SelectCommand="Web_SelectFolderInfoAL_CCW" SelectCommandType="StoredProcedure"
            UpdateCommand="Web_UpdateFolderInfoAL_CCW" UpdateCommandType="StoredProcedure">
            
           <UpdateParameters>
                <asp:Parameter Name="folderrsn" Type="Int64" />
                <asp:Parameter Name="spayed" Type="Int32"  DefaultValue="0"/>                
                <asp:Parameter Name="not_spayed" Type="Int32" DefaultValue="0" />
                <asp:Parameter Name="breed1" Type="String" DefaultValue="" />
                <asp:Parameter Name="breed2" Type="String" DefaultValue=""/>
                <asp:Parameter Name="birthdate1" Type="String" DefaultValue=""/>
                <asp:Parameter Name="birthdate2" Type="String" DefaultValue=""/>
                <asp:Parameter Name="accept" Type="String" DefaultValue="" />
            </UpdateParameters>  [\code]

and the start of my sql code [code]
ALTER     procedure dbo.Web_UpdateFolderInfoAL_CCW (
@folderrsn bigint,
@spayed int,
@not_spayed int,
@breed1 varchar(100),
@breed2 varchar(100),
@birthdate1 varchar(20),
@birthdate2 varchar(20),
@accept varchar(3)
) as 

[\code]
 
This is the problem with using datasource controls. They make building a page easier, but it's more difficult to debug as you can see. I would use Microsoft's helper classes or, use command objects and call your stored procedures yourself. It will take a little more code, but in the long run, it will help you debug and maintain code.
 
thanks
I figured it out. my select had a field with a slightly different name than the update.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top