You need to tell SQL Server to NOT return a "x rows affected" message, using SET NOCOUNT ON.
ALTER PROC SP_DAVE AS BEGIN SET NOCOUNT ON -- << ADD THIS LINE update mytable set st = getdate() where date = getdate(); if @@rowcount != 0 begin RAISERROR ('No Rows !!',16,1); RETURN -1; end RETURN 0; END;
In reply to Re: Trapping Stroed Proc errors with MSSQL
by EdwardG
in thread Trapping Stroed Proc errors with MSSQL
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |