ZIBEventAlerter always return "after insert" event instead of "after update" event
Posted: 16.07.2019, 08:38
ZeosLib 7.27.2.4-stable
Firebird 3.0.4
Lazarus 2.0.2
I created a test code using
SQLQuery,SQLTransaction,IBConnection and FBEventMonitor.
the test code work fine.
and check with FlameRobin -> Database -> Tools --> Monitor Events
also work correctly.
but with ZeosLib 7.27.2.4-stable
ZIBEventAlerter1 Always return after insert event instead of after update event.
/*------------------------------
insert single record directly from dbgrid.
/* --------- After Insert Trigger ---------- */
/* --------- After Update Trigger ---------- */
Try with another ZQuery
ZConnection TransactIsolationLevel = tiReadCommitted
Try with other TransactIsolationLevel ...
I'm just being curious.
Firebird 3.0.4
Lazarus 2.0.2
I created a test code using
SQLQuery,SQLTransaction,IBConnection and FBEventMonitor.
the test code work fine.
and check with FlameRobin -> Database -> Tools --> Monitor Events
also work correctly.
but with ZeosLib 7.27.2.4-stable
ZIBEventAlerter1 Always return after insert event instead of after update event.
/*------------------------------
Code: Select all
ZConnection1.Autocommit := True;
ZQuery1.CachedUpdates:=True;
Code: Select all
ZQuery1.ApplyUpdates;
Code: Select all
SET TERM ^ ;
CREATE TRIGGER ISSUES_AI FOR ISSUES ACTIVE
AFTER insert POSITION 0
AS
BEGIN
post_event 'issue_added';
END^
SET TERM ; ^
Code: Select all
SET TERM ^ ;
CREATE TRIGGER ISSUES_AU FOR ISSUES ACTIVE
AFTER update POSITION 0
AS
BEGIN
post_event 'issue_updated';
END^
SET TERM ; ^
Code: Select all
ZQuery2.SQL:=ZQuery1.SQL;
ZQuery2.Open;
ZQuery2.Append;
// Copy the current record
for i := 0 to ZQuery1.FieldCount - 1 do
ZQuery2.Fields[i].Value := ZQuery1.Fields[i].Value;
ZQuery2.ApplyUpdates;
Try with other TransactIsolationLevel ...
I'm just being curious.