UniAlerter problem
Posted: Wed 14 Apr 2010 14:15
Hi,
i can't use the same UniConnection both for UniQuery and UniAlerter.
as follows;
I have a UniConnection, a UniQuery, a UniAlerter, a DataSource and a DBGrid comp. on my Form. I have a update trigger on my Orders table that fires the event ( POST_EVENT update ). I'm update the Orders table data over the DBGrid. When i use the 1.option there is no problem. But in the 2. option, application still not responding after a few update. When i use a second UniConnection for UniAlerter then it work again. ( DB is Firebird 2.1 )
i can't use the same UniConnection both for UniQuery and UniAlerter.
as follows;
I have a UniConnection, a UniQuery, a UniAlerter, a DataSource and a DBGrid comp. on my Form. I have a update trigger on my Orders table that fires the event ( POST_EVENT update ). I'm update the Orders table data over the DBGrid. When i use the 1.option there is no problem. But in the 2. option, application still not responding after a few update. When i use a second UniConnection for UniAlerter then it work again. ( DB is Firebird 2.1 )
Code: Select all
procedure TForm1.UniAlerter1Event(Sender: TDAAlerter; const EventName,
Message: string);
begin
// 1. option
Memo1.Lines.Add(TimeToStr(time)+': '+EventName);
// 2. option
UniConnection1.ExecSQL('insert into event values('''TimeToStr(time)+': '+EventName+''')',[]);
end;