Hi All:

I want to run the follwing procedure using DTS:

Declare @Err1 varchar(50)
Insert into Test(SID, SName)
Values (1, 'SAM')
Set @Err1 = @@error
if @Err1 <> 0
begin
set @Err1 = 'Fail ' +@Err1
end
else
begin
set @Err1 = 'Success'
end


insert into dbo.Log_Process (ProcessLogID, ErrorDesc)
values (1, @Err1 )


Now once I run this proc using Query Analyzer, If there is any insert error, It gives me server message error but If I attach this proc with DTS, due to insert error, DTS will fail.

I just want that DTS should not fail and error should be logged to LOG TABLE only with error number.

Thanks in advance for any help.