dbo.QER_TIHardwareType
Database TriggerSQL_TRIGGERSandbox DB
Interpretation
- Database trigger. Treat parent table and enqueue/object-layer calls as the main relation points.
Relations
- Trigger parent table: HardwareType
Typed Edges
- trigger on table HardwareType Trigger parent table: HardwareType
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
- references source dbo.QER_TIHardware source text reference
References
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger QER_TIHardwareType2 ON HardwareType FOR3INSERT NOT FOR Replication4AS5BEGIN6 BEGIN TRY7 IF EXISTS(8 SELECT TOP 1 19 FROM inserted)10 GOTO start11 RETURN start:12 DECLARE @GenProcID varchar(38)13 SELECT @GenProcID = dbo.QBM_FGISessionContext('')14 DECLARE @errno int15 DECLARE @errmsg nvarchar(255)16 IF EXISTS(17 SELECT TOP 1 118 FROM inserted i19 JOIN HardwareType p20 ON i.UID_HardwareTypeAlternate = p.UID_HardwareType AND p.isInactive = 1)21 BEGIN22 RAISERROR('#LDS#Assignment cannot take place, because the device type is disabled.|',23 18,24 1)25 WITH nowait26 END27 END TRY28 BEGIN CATCH29 EXEC QBM_PSessionErrorAdd DEFAULT30 RAISERROR('',31 18,32 1)33 WITH NOWAIT34 END CATCH35 ende:36 RETURN37END
Open raw exported source
1 create trigger QER_TIHardwareType on HardwareType for Insert not for Replication as begin BEGIN TRY if exists (select top 1 1 from inserted2) goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('') declare @errno int declare @errmsg nvarchar3(255) if exists(select top 1 1 from inserted i join HardwareType p on i.UID_HardwareTypeAlternate = p.UID_HardwareType and p.isInactive = 1 ) begin raiserror4( '#LDS#Assignment cannot take place, because the device type is disabled.|', 18, 1) with nowait end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default5 RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 6