TUniScript can not support "case ... end"

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
TinTin
Posts: 46
Joined: Sat 30 May 2009 14:09

TUniScript can not support "case ... end"

Post by TinTin » Thu 30 May 2013 01:51

firebird 2.5.2+xe2+unidac 4.6.12(TUniScript )
if i drop case end statments,it works!

CREATE OR ALTER TRIGGER TSP_BILL_AID0 FOR TSP_BILL
ACTIVE AFTER INSERT OR UPDATE OR DELETE POSITION 0
AS
begin
if (inserting) then
insert into sys_log_data(id,table_name,update_time,state) values(new.id,'TSP_BILL',current_time,'I');
else if (deleting) then
update sys_log_data set update_time = current_timestamp,state='D' where id = old.id and table_name ='TSP_BILL';
else if (updating) then
update sys_log_data set update_time = current_timestamp,
state = case when upload_time is null then 'E' else 'U' end
where id = old.id and table_name = 'TSP_BILL' ;
end

AndreyZ

Re: TUniScript can not support "case ... end"

Post by AndreyZ » Mon 03 Jun 2013 09:53

To avoid the problem, you should change the TUniScript.Delimiter property. For example:

Code: Select all

UniScript.Delimiter := '/';

Post Reply