This content has been marked as final. Show 6 replies
sounds like you can just make it unrestricted.
Very interesting! why can't we do this with every trigger. I see the restricted thing as the biggest problem with this product.
Specifies the dispatch mode for ActiveX control events. By default, all PL/SQL event procedures that are associated with ActiveX events are restricted. This means that go_item cannot be called from within the procedure code and OUT parameters are not observed. However, there are instances when the same event may apply to multiple items and a go_item is necessary. This requires that the event be dispatched as unrestricted. Using the On-Dispatch-Event trigger, you can call DISPATCH_EVENT to specify the dispatch mode as either restricted or unrestricted. For more information about working with ActiveX control events, see Responding to ActiveX Control Events in the online help system.
Built-in Type unrestricted procedure
Enter Query Mode yes
sync Specifies the dispatch mode as either restricted (RESTRICTED), or unrestricted (RESTRICTED_ALLOWED).
The best solution to this limitation is to use a Timer to execute the Restricted Built-ins. In your case, you would create a 1 millisecond timer in your On-Dispatch-Event trigger at the point where you want to execute the Restricted built-in. Next you need to create Module/Form level When-Timer-Expired (WTE) trigger to handle the execution of your timer. For example:
/* Sample On-Dispatch-Event trigger */ DECLARE Timer_ID TIMER; BEGIN /* Your trigger logic here... */ --Point in your logic where you want to call the Next_Record built-in Timer_ID := Create_Timer('CALL_NEXT_RECORD',1,NO_REPEAT); /* Rest of your logic here, so long as it is not dependent on the execution of the Next_Record built-in. For this, you would need to include this logic in the WTE trigger. */ END;
Hope this helps,
/* Sample When-Timer-Expired trigger */ DECLARE v_Timer VARCHAR2(30) := Get_Application_Property(TIMER_NAME); BEGIN IF ( v_Timer := 'CALL_NEXT_RECORD' ) THEN NEXT_RECORD; /* Include any logic here that was dependend on the execution of the Next_Record built-in. */ END IF; END;
If someone's response is helpful or correct, please mark it accordingly.
There are other ways to accomplish your goal. The most reliable method I have found is the use of timers. Yes, this does place a lot of code in a single trigger, but you can always write Forms Program Units (PUs) for the different ActiveX objects and then call the program units from your WTE trigger moving the bulk of the code to the PUs. Either way, the controlling event is the WTE trigger.