Subject | Re: [ib-support] Delphi events and IB triggers |
---|---|
Author | Martijn Tonies |
Post date | 2002-01-27T11:22:06Z |
Hi,
Delphi events and IB triggers have nothing in common except that they
both respond to other actions.
A piece of Delphi code doesn't call a trigger and a trigger doesn't call
a piece of Delphi code.
Triggers are defined at database level to fire whenever something happens
to the table they're defined on (BEFORE DELETE, AFTER UPDATE
and so on).
If you have a BeforeDelete event in Delphi, this will be called before
doing the actual DELETE on the database. When the DELETE on the
database is performed, it will call the triggers BEFORE DELETE and
AFTER DELETE.
Hope this helps,
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
how do Delphi events coexist with IB triggers and constraints ?
say I define a BeforeDelete event for table A:
- will Delphi translate it into an IB trigger ?
- if a trigger before delete is defined, which will be called first ?
- the following constraint
add constraint <constraint_name> foreign key (ParentID)
references parent (ParentID)
ON DELETE CASCADE
will call my BeforeDelete code ?
Thank you
Duilio Foschi
Yahoo! Groups Sponsor
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Delphi events and IB triggers have nothing in common except that they
both respond to other actions.
A piece of Delphi code doesn't call a trigger and a trigger doesn't call
a piece of Delphi code.
Triggers are defined at database level to fire whenever something happens
to the table they're defined on (BEFORE DELETE, AFTER UPDATE
and so on).
If you have a BeforeDelete event in Delphi, this will be called before
doing the actual DELETE on the database. When the DELETE on the
database is performed, it will call the triggers BEFORE DELETE and
AFTER DELETE.
Hope this helps,
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
how do Delphi events coexist with IB triggers and constraints ?
say I define a BeforeDelete event for table A:
- will Delphi translate it into an IB trigger ?
- if a trigger before delete is defined, which will be called first ?
- the following constraint
add constraint <constraint_name> foreign key (ParentID)
references parent (ParentID)
ON DELETE CASCADE
will call my BeforeDelete code ?
Thank you
Duilio Foschi
Yahoo! Groups Sponsor
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.