开发者

How to register events posted from Firebird with parameters in Delphi

开发者 https://www.devze.com 2023-03-11 00:46 出处:网络
I have an event posted from firebird database in a trigger after a new record is inserted like this: post_event \'SPOOL\' + new.username;

I have an event posted from firebird database in a trigger after a new record is inserted like this: post_event 'SPOOL' + new.username; I want to register this event with SIBfibEventAlerter (FIBPlus) in a Delphi application and ru开发者_如何转开发n a procedure. Problem is that event name depends on user name added the record.


You could read the usernames from the user table (if new.username is actually a field and not some FB system value) and create the eventalerters components dynamically, one per user name.


Since events don't really support parameters, one way would be to add extra fields to table, which contain auto incremental id (or timestamp) and the data you need as a parameter.

0

精彩评论

暂无评论...
验证码 换一张
取 消