I think this must be something to do with why proper triggers impose
such a load on a universe system. It has to check for deletes using some
internal mechanism.

Mind you the replication in Universe imposes very little load and that
track deletes as well....

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Scott Ballinger
Sent: 11 March 2005 22:55
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Triggers docs?

I should think a little longer before pressing send... It's not that
easy to catch a delete using this kind of trigger. You can test for a
new record by trying to read it, if it's not there then this is a new
update. But since the trigger is called only once for a delete, it gets
pretty ugly to trap for this condition. The best answer I can come up
with on a Friday afternoon is treat every first pass as a delete, then
un-do whatever you did to track the delete on the second pass (if there
is one). That is a particularly heinous solution, however. There must be
a better way to do this.

Scott Ballinger
Pareto Corporation
Edmonds WA USA
206 713 6006

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Adrian Matthews
Sent: Friday, March 11, 2005 1:28 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Triggers docs?


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: u2-users@listserver.u2ug.org
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: u2-users@listserver.u2ug.org
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
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
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
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
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
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to