maria t

maria t

  • NA
  • 12
  • 1.2k

sql trigger & c#

Nov 27 2016 6:57 AM
Hi.why my error message in sql trigger,doesn't show in c#?
while this code run correct in c#. 
 
CREATE TRIGGER [dbo].[trg_CheckBalance_me]
ON [dbo].[st_havaleh_info]
FOR INSERT,update
AS
BEGIN
SET NOCOUNT ON;
if ((select count_kala from st_seating where Code_kala=(select code_material from inserted )) < ((select count_unit from inserted)-(select count_unit from deleted)))
begin
ROLLBACK TRAN;
RAISERROR ('count of materials are low',16,1);
return
end
END;
go
 

Answers (1)