SQL Server stored procedure returning 'fail'

keemuph

New Member
I have a stored procedure in SQL Server 2008 that needs to delete a few rows of data. But when I run it, it returns a fail and a value of -6.\[code\]ALTER procedure [dbo].[p_CaseFiles_Exhibits_DeleteExhibits] @ExhibitID int, @Message nvarchar(50) outputasdeclare @FileID intset @FileID = (select FileID from CaseFileExhibits where ExhibitID = @ExhibitID)begin transaction begin try delete from CaseFileExhibitMovementTracking where ExhibitID = @ExhibitID delete from CaseFileExhibitAttachments where CaseFileExhibitID = @ExhibitID delete from CaseFileExhibits where ExhibitID = @ExhibitID delete from CaseFileExhibitPropertyLink where ExhibitID = @ExhibitID update CaseFileQuickStats set ExhibitCount = ExhibitCount -1 where CaseFileID = @FileID commit transaction end try begin catch set @Message='Fail' rollback transaction end catch\[/code\]I can't seem to find what's wrong.
 
Back
Top