hey,mark
thx for your reply.
i have already solve it.
maybe some questions when i use the function of FBscript.
anyway,thx a lot.
Regards
Chen
------------------ 原始邮件 ------------------
发件人: "Mark Rotteveel";<ma...@la...>;
发送时间: 2016年7月3日(星期天) 凌晨5:23
收件人: "For users and developers of the Firebird .NET providers"<fir...@li...>;
主题: Re: [Firebird-net-provider]some questions about Firebirsql
You need to remove set term instructions, it is not actually part of the Firebird syntax. They are only used by query tools like ISQL and Flamerobin.
So remove both set term instructions and the ^ after the final end and you should be able to execute the create trigger using the .net provider.
Mark
----- Bericht beantwoorden -----
Van: "陈文欢" <91...@qq...>
Aan: "firebird-net-provider" <fir...@li...>
Onderwerp: [Firebird-net-provider] some questions about Firebirsql
Datum: za, jul. 2, 2016 12:25
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 |