Może podpowiecie czemu nie wyskakuje mi okno informacyjne ?? jest tylko okno błędu
Operacja zmiany obiektu ZamNag o identyfikatorze (960:508161:84516:0). Identyfikator operacji: AnulowanieZamowienia-1. Błąd: , .
TRIGGER [CDN].[Blokuj_Zamykanie] ON [CDN].[ZamNag]
FOR UPDATE, Insert
AS
begin
SET NOCOUNT ON
declare @ZTYP int
declare @ZGID int
select @ZTYP = inserted.ZaN_GIDTyp, @ZGID=inserted.ZaN_GIDNumer from inserted
IF UPDATE(ZaN_Stan) -- czy aktualizacja stanu dokumentu\
begin
if exists(select null from inserted where ZaN_Stan = 51) -- czy zamykamy
if exists(select null from inserted where ZaN_ZamTyp = 1280 and ZaN_ZamSeria <> 'm' ) --czy nie M
if NOT exists(select null from cdn.Atrybuty inner join inserted on atr_obityp = @ZTYP and atr_obinumer = @ZGID where atr_atkId = 35 and atr_wartosc <> '') -- czy atrybut
BEGIN
RAISERROR('#CDN_INFO/# #CDN_1=UWAGA Zamykanie/# #CDN_2=Zamykanie./# #CDN_3=Popraw Atrybuty/#',16, 1)
ROLLBACK TRAN
END
END
end
SET @komunikat = '#CDN_BLAD/#'
SET @komunikat = @komunikat + ' #CDN_1=' + @komunikat_blad + '/#'
SET @komunikat = @komunikat + ' #CDN_2=' + @komunikat_przyczyna + '/#'
SET @komunikat = @komunikat + ' #CDN_3=' + @komunikat_remedium +'/#'
RAISERROR(@komunikat,16,11)
..z jedną istotną uwagą. W XL-u jest jakiś max na długość @komunikatu, z którą sobie radzi XL. Powyżej niej komunikat się rozsypuje i ładne okienko XL-owe z zakładkami nie jest już generowane.