How do you track a record being deleted from the file though?

The real trigger mechanism fires with INSERT, UPDATE or DELETE.

If memory serves this type of pseudo-trigger can't differentiate between
a delete and an insert/update.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Scott Ballinger
Sent: 11 March 2005 20:37
To: [email protected]
Subject: RE: [U2] Triggers docs?

Here is link that might be helpful: (works for both UV & UD)

http://www.mindspring.com/~tpackert/unidata_tricks.htm

I have used the index-trigger method to track and record all changes to
a file. It seems to work well; the performance hit has been negligible.
If anyone is interested I will post the code. The only gotcha was
figuring out how many times the TRIGGER subroutine was called, and what
my RECord variable contained each time. Here is the note at the top of
the subroutine regarding this:

SUBROUTINE SAVE.CHANGES.MYFILE(ANS,REC,ID)
* This subroutine is called from the 'TRIGGER' I-Type in dict MYFILE.
* A secondary index on MYFILE is defined on 'TRIGGER' using the NO.NULLS
option.
* That forces this subroutine to be called twice when a MYFILE record is
updated:
*  the first time with REC = the original record, then again with REC =
the new
*  record (however, if the MYFILE record is new, this subroutine is
called only once).

Scott Ballinger
Pareto Corporation
Edmonds WA USA
206 713 6006

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dan Fitzgerald
Sent: Friday, March 11, 2005 10:15 AM
To: [email protected]
Subject: [U2] Triggers docs?


The manual is a bit skimpy on triggers. Any supplemetal docs around?

We're trying to track updates to a file; individual items have gone
missing 
lately. No SQL involvement at all.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/


The information contained in this email is strictly confidential and for the 
use of the addressee only, unless otherwise indicated. If you are not the 
intended recipient, please do not read, copy, use or disclose to others this 
message or any attachment. Please also notify the sender by replying to this 
email or by telephone +44 (0)20 7896 0011 and then delete the email and any 
copies of it. Opinions, conclusions (etc.) that do not relate to the official 
business of this company shall be understood as neither given nor endorsed by 
it.  IG Markets Limited and IG Index Plc are authorised and regulated by the 
Financial Services Authority and, in Australia, by the Australian Securities 
and Investments Commission.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to