User-2006371901 posted
I get a : "Procedure or function 'sp_mysp' expects parameter '@LastNameT6e', which was not supplied" at execution ; I have assigned all my ado.net correctly it seems , as these same object identifiers work in all my other related scripts:
SqlCommand cmd = new SqlCommand("sp_mysp", new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]));
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@FirstNameT6e", mFirstNameT6e);
cmd.Parameters.AddWithValue("@LastNameT6e", mLastNameT6e);
cmd.Parameters.AddWithValue("@DateT6e", mDateT6e);
cmd.Connection.Open();
cmd.ExecuteNonQuery();
cmd.Connection.Close();
-- STORED PROCEDURE:
ALTER PROCEDURE [dbo].[sp_mysp] (
@FirstNameT6e nvarchar (50) NULL,
@LastNameT6e nvarchar (50) NULL,
@DateT6e varchar (50) NULL
AS
BEGIN
SET NOCOUNT ON;
INSERT INTO [Contacts]
(FirstNameT6e,
LastNameT6e,
DateT6e) VALUES (@FirstNameT6e,
@LastNameT6e,
@DateT6e);
END
??
thanks in advance
Ned