I have a table that stores last name, middle name and first name. I insert values in these columns using a stored procedure. But for those whose names doesn’t have middle name like Marry Jones, Laite Manuel, etc, when I click into insert button, the stored procedure reports an error saying: it expects @MiddleName which was not specified. How can I solve this?
The stored procedure contains the following code:
…
@FirstName varchar(50),
@MiddleName varchar(50),
@LastName varchar(50)
AS
BEGIN
(
FirstName ,
MiddleName,
LastName
)
VALUES
(
@FirstName ,
@MiddleName,
@LastName
)
END
My InsertNamesaspx page contain an insert button, an insertReportLabel (Label) and the following ID names of textboxes:
firstNameTexxBox – for editing first names;
middleNameTexxBox - for editing middle names;
lastNameTexxBox - for editing last names.
Please help.