FormView - Procedure or function spInsertVessel has too many arguments specified.

Posted on 2011-10-28
Last Modified: 2012-05-12
Hi I am getting the above error when I try to insert a record using FormView.  I've added a function to display the parameters and their values on screen and they are being repeated as follows:

Parameter:@vesselName Parameter Value:(null) 0.01658004020064 0.014521
Parameter:@vesselOwner Parameter Value:(null) 0.016653513225843 0.000073
Parameter:@vesselPLN Parameter Value:(null) 0.0166791449751295 0.000026
Parameter:@Vessel_Name Parameter Value:Old Victoria 0.0167033798988419 0.000024
Parameter:@Vessel_Owner Parameter Value:Mrs Smith 0.0167269164097672 0.000024
Parameter:@Vessel_PLN Parameter Value:LP 4565 0.0167507322858073 0.000024

My insert parameters are as follows:
                <asp:Parameter Name="vesselName" Type="String" />
                <asp:Parameter Name="vesselOwner" Type="String" />
                <asp:Parameter Name="vesselPLN" Type="String" />

Please could someone tell me why these are repeating - I need to resolve this asap.
Thanks, Lorna
Question by:Lorna70
    LVL 10

    Accepted Solution

    you need to give all the parameter values for your sp
    you missed the Vessel_Name,Vessel_Owner and Vessel_PLN

    Author Comment

    The Parameters were generated by VisualStudio but it looks like I have to give the parameters the exact same name as the DB table fields?  Is this correct?  This would mean changing my sproc variable names and the names in my ASP.Net file to the exact fieldnames??
    LVL 10

    Expert Comment

    by:Jini Jose
    yes it should be same

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
    In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now