home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd1.bin / tema / SW602 / Winbase / EShop_demo / TEST_PROFIL.TRG < prev    next >
Text File  |  2000-03-16  |  735b  |  28 lines

  1. {$$3219993938 .                              }TRIGGER `test_profil`  AFTER UPDATE ON `Sys_par`
  2. REFERENCING OLD AS `old` NEW AS `new`
  3. FOR EACH ROW
  4.  BEGIN   //0
  5.  
  6.   DECLARE res INT;
  7.   DECLARE heslo CHAR(20);
  8.  
  9.  IF ((new.mailovat=true) AND (new.PROFIL<>old.PROFIL)) THEN
  10.   BEGIN //1
  11.    SET heslo=NULL;
  12.    SET res= InitWBmail(new.Profil,heslo);
  13.     IF res<>0 THEN 
  14.       begin
  15.         CALL log_write("chyba inicializace poÜty "+int2str(res)); 
  16.         CALL log_write(new.Profil); 
  17.         CALL mailerr(res); 
  18.       end;
  19.     ELSE 
  20.       begin
  21.         CALL log_write("Inicializace poÜty s profilem "+new.Profil+" prob∞hla ·sp∞Ün∞."); 
  22.         CALL CloseWBMail;
  23.       end;
  24.     END IF;
  25.   end;   //1
  26.  END IF;
  27. END  //0
  28.