hi,guys

i have a question about how to create trigger.


when i use the Firebird .net Provider 5.0  .  i dont kown how to create the 
commandtext for trigger.


e.g


SET TERM ^ ;


CREATE TRIGGER TCURRENTSET_BI FOR TCURRENTSET
ACTIVE BEFORE INSERT POSITION 0
AS
DECLARE VARIABLE tmp DECIMAL(18,0);
BEGIN
  IF (NEW.RD IS NULL) THEN
    NEW.RD = GEN_ID(GEN_TCURRENTSET_RD, 1);
  ELSE
  BEGIN
    tmp = GEN_ID(GEN_TCURRENTSET_RD, 0);
    if (tmp < new.RD) then
      tmp = GEN_ID(GEN_TCURRENTSET_RD, new.RD-tmp);
  END
END^


SET TERM ; ^



please tell me how to do that . thx so much


Best Regards
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to