<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><SubmitCommand CommandText="SP_Contact_Create"
CommandType="StoredProcedure">
</p>
<p><Parameter Name="Name" />
</p>
<p><Parameter Name="Email" />
</p>
<p><Parameter Name="Phone" />
</p>
<p><Parameter Name="Phone2" />
</p>
<p><Parameter Name="Address" />
</p>
<p><Parameter Name="City" />
</p>
<p><Parameter Name="State" />
</p>
<p><Parameter Name="Zip" />
</p>
<p><Parameter Name="Country" />
</p>
<p><Parameter Name="Department" />
</p>
<p><Parameter Name="Subject" />
</p>
<p><Parameter Name="Message" />
</p>
<p><Parameter Name="ERROR"
Direction="Output" DataType="string" />
</p>
<p></SubmitCommand
</p>