If using SQL 2005 or higher you could change your error handling to a TRY..CATCH. But, if you keep it the same you need adjust your error checking, because it will nto work as you have it. ANY statement affects the value of @@ERROR. So you would need to change to something like:ALTER procedure [dbo].[AddTrainee]@TraineeEmail varchar(75),@Fname varchar(50),@Lname varchar(50),@TimesID int,@LocID intASset NOCOUNT on declare @TraineeID intDECLARE @TRANCOUNT intDECLARE @Error intSET @TRANCOUNT = @@TRANCOUNTBegin Tran TranStartinsert into Trainee(TraineeEmail, Fname, Lname)values(@TraineeEmail,@Fname,@Lname)SELECT @Error = @@ERROR, @TraineeID =SCOPE_IDENTITY()if @Error<>0Begin Rollback Transaction -- RAISERROR? ReturnEndinsert into TraineeInfo(TimesID, LocID)values(@TimesID,@LocID)if @@error<>0Begin Rollback Transaction -- RAISERROR? ReturnEndCommit Tran Transtartselect @TraineeID as TraineeID