Subject | Re: [ib-support] Delphi events and IB triggers |
---|---|
Author | Helen Borrie |
Post date | 2002-01-27T11:17:58Z |
At 12:01 PM 27-01-02 +0100, you wrote:
So any action defined in a Before Delete trigger in the child record will take place before the child record is deleted. This is unrelated to the BeforeDelete method in Delphi, which you would use for any processing you want the client to perform before the Delete() method of the dataset gets called.
cheers,
Helen
All for Open and Open for All
Firebird Open SQL Database ยท http://firebirdsql.org
_______________________________________________________
>how do Delphi events coexist with IB triggers and constraints ?No. Delphi has no way to know what is going on at the server.
>
>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 ?This tells the database engine that, when the master record identified by ParentID (sounds strange?? ParentID in a master record??) gets deleted, then all the related records in this table should be deleted too.
>- the following constraint
>
>add constraint <constraint_name> foreign key (ParentID)
>references parent (ParentID)
>ON DELETE CASCADE
So any action defined in a Before Delete trigger in the child record will take place before the child record is deleted. This is unrelated to the BeforeDelete method in Delphi, which you would use for any processing you want the client to perform before the Delete() method of the dataset gets called.
>will call my BeforeDelete code ?Delphi doesn't know about server constraints (other than Primary Key) and the server doesn't know about Delphi methods.
cheers,
Helen
All for Open and Open for All
Firebird Open SQL Database ยท http://firebirdsql.org
_______________________________________________________