1
Answer

sql trigger & c#

maria t

maria t

7y
242
1
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)