Even though I have a Begin and End around the Rollback transaction why do I get this error? Is this anything do with this option "XACT_ABORT" ? Below is my code. Could you please tell where I am going wrong?
if not exists (select * from inserted where subs1 is null)
Begin
RAISERROR ('Field SUBS1 Is Read Only. Updating this field will cause loss of integrity', 16, 1)
Begin
ROLLBACK TRANSACTION;
End
End
if not exists (select * from inserted where subs1 is null)
Begin
RAISERROR ('Field SUBS1 Is Read Only. Updating this field will cause loss of integrity', 16, 1)
Begin
ROLLBACK TRANSACTION;
End
End