Try this procedure..
For inserting and updating concatenate all the data using a single special character ie CommandValues and send it to the procedure with CommandName ie.,Insert, Update or Delete.
ALTER PROCEDURE spBooks
@CommandName VARCHAR(10),
@CommandValues VARCHAR(MAX)
AS
BEGIN
DECLARE @Data VARCHAR(MAX), @BookID INT, @Title VARCHAR(100),
@PublisherName VARCHAR(30), @PublishedDate DATETIME,
@pos1 INT, @pos2 INT, @pos3 INT, @pos4 INT
IF(@CommandName='SELECT')
BEGIN
SELECT * FROM tblBook
END
ELSE IF(@CommandName='UPDATE')
BEGIN
SET @Data=@CommandValues
SET @pos1=charindex('±', @DATA)
SET @BookID=SUBSTRING(@data, 1, @pos1-1)
SET @pos2=CHARINDEX('±', @DATA, @pos1+1)
SET @Title=SUBSTRING(@DATA, @pos1+1, @pos2-@pos1-1)
SET @pos3=CHARINDEX('±', @DATA, @pos2+1)
SET @PublisherName=SUBSTRING(@DATA, @pos2+1, @pos3-@pos2-1)
SET @pos4=CHARINDEX('±', @DATA, @pos3+1)
SET @PublishedDate=SUBSTRING(@DATA, @pos3+1, @pos4-@pos3-1)
UPDATE tblBook SET Title=@Title, PublisherName=@PublisherName,
PublishedDate=@PublishedDate WHERE BookID=@BookID
END
ELSE IF(@CommandName='INSERT')
BEGIN
SET @Data=@CommandValues
SET @pos1=charindex('±', @DATA)
SET @Title=SUBSTRING(@data, 1, @pos1-1)
SET @pos2=CHARINDEX('±', @DATA, @pos1+1)
SET @PublisherName=SUBSTRING(@DATA, @pos1+1, @pos2-@pos1-1)
SET @pos3=CHARINDEX('±', @DATA, @pos2+1)
SET @PublishedDate=SUBSTRING(@DATA, @pos2+1, @pos3-@pos2-1)
INSERT INTO tblBook VALUES(@Title, @PublisherName, @PublishedDate)
END
ELSE IF(@CommandName='DELETE')
BEGIN
DELETE FROM tblBook WHERE BookID=@CommandValues
END
END
In the case of deleting the row send only ID of the row in CommandValues..
All the best..