XModPro

Odd errors when attemping to use a Stored Procedure

David Puffenberger David Puffenberger asked Sep 20, 2018
Active Sep 21 · Viewed 2272 times
<p>Hi again, </p> <p>I'm trying to modify a form to trigger a stored procedure upon submit. I have written up a stored procedure and tested it by running the EXEC command from within SQL Management Studio. So it appears to be working. </p> <p>However, after I modified the form to use the stored procedure, I keep getting this error: Procedure or function SP_Contact_Create has too many arguments specified." </p> <p>I've been trying to figure this out all afternoon but I just keep running into this error and cannot figure it out. </p> <p>Thanks in advance for any assistance. My code snippets are below. </p> <p>-David </p> <p>Stored Procedure </p> <p>SET ANSI_NULLS ON </p> <p>GO </p> <p>SET QUOTED_IDENTIFIER ON </p> <p>GO </p> <p>CREATE PROCEDURE [dbo].[SP_Contact_Create] </p> <p>@Name nvarchar(255), </p> <p>@Phone nvarchar(255), </p> <p>@Phone2 nvarchar(255), </p> <p>@Address nvarchar(255), </p> <p>@City nvarchar(255), </p> <p>@State nvarchar(255), </p> <p>@zip int, </p> <p>@Country nvarchar(255), </p> <p>@Department nvarchar(255), </p> <p>@Subject nvarchar(255), </p> <p>@Message nvarchar(MAX) </p> <p>AS </p> <p>BEGIN </p> <p>-- SET NOCOUNT ON added to prevent extra result sets from </p> <p>-- interfering with SELECT statements. </p> <p>SET NOCOUNT ON; </p> <p>INSERT INTO [dbo].[Contact_Form] ( </p> <p>[Name], </p> <p>[Email], </p> <p>[Phone], </p> <p>[Phone2], </p> <p>[Address], </p> <p>[City], </p> <p>[State], </p> <p>[Zip], </p> <p>[Country], </p> <p>[Department], </p> <p>[Subject], </p> <p>[Message] </p> <p>) VALUES ( </p> <p>@Name, </p> <p>@Email, </p> <p>@Phone, </p> <p>@Phone2, </p> <p>@Address, </p> <p>@City, </p> <p>@State, </p> <p>@Zip, </p> <p>@Country, </p> <p>@Department, </p> <p>@Subject, </p> <p>@Message </p> <p>) </p> <p>END </p> <p>GO </p> <p>Xmod Submit Command </p> <p>&lt;SubmitCommand CommandText="SP_Contact_Create" CommandType="StoredProcedure"&gt; </p> <p>&lt;Parameter Name="Name" /&gt; </p> <p>&lt;Parameter Name="Email" /&gt; </p> <p>&lt;Parameter Name="Phone" /&gt; </p> <p>&lt;Parameter Name="Phone2" /&gt; </p> <p>&lt;Parameter Name="Address" /&gt; </p> <p>&lt;Parameter Name="City" /&gt; </p> <p>&lt;Parameter Name="State" /&gt; </p> <p>&lt;Parameter Name="Zip" /&gt; </p> <p>&lt;Parameter Name="Country" /&gt; </p> <p>&lt;Parameter Name="Department" /&gt; </p> <p>&lt;Parameter Name="Subject" /&gt; </p> <p>&lt;Parameter Name="Message" /&gt; </p> <p>&lt;Parameter Name="ERROR" Direction="Output" DataType="string" /&gt; </p> <p>&lt;/SubmitCommand </p>

1 Answer

Loading answers...