Hi,I created this stored procALTER PROCEDURE [dbo].[spAddEditProgram] @id int, @pname varchar(150)ASBEGIN SET NOCOUNT ON; if (@id <= 0) or (@id is null) Begin if (not exists (select ProgramID from Programs where lower(ProgramName) = lower(@pname))) Begin insert into Programs(ProgramName) values (@pname); end else Begin -- we have a duplicate program name! raise error RAISERROR('Error! That Program Name already exists! Choose a new name or edit the existing one.', 10, 1) end end else if (exists (select ProgramID from Programs where ProgramID = @id)) Begin update Programs set ProgramName = @pname where ProgramID = @id; endEND
I call the stored proc from a classic ASP page however when I enter a duplicate name the stored proc handles it correctly (yay!) but the asp recordset is empty (bleah)How do i get the error string into the recordset? Am I raising the error correctly?it works right if I run the sp from the query analyzer.Please advise...Best regards, Zim(Eternal Yak God Emperor from the Future)