trying to get this stored procedure to work.
ALTER PROCEDURE [team1].[add_testimonial]
-- Add the parameters for the stored procedure here
@currentTestimonialDate char(10),@currentTestimonialContent varchar(512),@currentTestimonialOriginator varchar(20)
AS
BEGIN
DECLARE
@keyValue int
SET NOCOUNT ON;
--Get the Highest Key Value
SELECT @keyValue=max(TestimonialKey)
FROM Testimonial
--Update the Key by 1
SET @keyValue=@keyValue+1
--Store into table
INSERT INTO Testimonial VALUES (@keyValue, @currentTestimonialDate, @currentTestimonialContent, @currentTestimonialOriginator)
END
yet it just returns
Running [team1].[add_testimonial] ( @currentTestimonialDate = 11/11/10, @currentTestimonialContent = this is a test, @currentTestimonialOriginator = theman ).
No rows affected.
(0 row(s) returned)
@RETURN_VALUE = 0
Finished running [team1].[add_testimonial].
and nothing is added to the database, what might be the problem?