× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Alan,

Could I get a copy of your Trigger Mediator? 
Jim.Rubino@xxxxxxxx

TIA,

        Jim Rubino 
Senior Programmer Analyst 
FIKE CORPORATION (r) 

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] 
Sent: Tuesday, June 21, 2005 3:30 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Trigger Mediator II

Thanks to all the requests on the Trigger Mediator but a thought came to
me as I was driving around at lunch that I hadn't considered what would
happen if you wanted to issue an error in trigger service program if,
for example, you were checking referential integrity in the trigger
service and found that you would be creating a referential error if you
allowed the record to be deleted. 

Thought about it for a bit and very easy to fix.

In trigger service program (TS0001 template), simply add a throw for the
given error. 

If condition true,
   ERRH_Throw('UXX0000'             :

              <Your Message File>   :

              <MessageDataStructure>);
EndIf

In the Trigger Mediator, replace the "//Insert Error Code" with code
below marked with the | symbol.

pptrCallProcedure = DetailRecord.pptrTriggerProcedure;

Monitor;

  CallProcedure(InDbTriggerBuffer:

                InDbTriggerLength);

On-Error;

|  If ERRH_GetLastMessage(MsgId:
|                         QMessageFile:
|                         MessageData );
|    ERRH_Throw(MsgId            :
|               QMessageFile:
|               MessageData );
|  EndIf:
EndMon;

Should have included in the original version. An error will be returned
to the caller and the update will not occur assuming a *BEFORE trigger.

                                                            
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.