Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Use of Stored Procedures
Message
From
27/05/1998 15:36:11
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00101049
Message ID:
00102502
Views:
26
Is the trigger in B necessary if being fired based on the trigger of A?
If not, you might try place code in your B trigger to bypass if called from
the trigger of A.
==========================
>>The process I described below is exactly how I am creating audit logs for my tables now. As far as returning the error code, one thing you could do is make use of the "gaerror" public array created by when the code generated by the RI builder runs and then check that array for error codes and messages (see Knowledge Base article Q142284).
>>
>All:
>
>Sorry to be a bother, but I am now running into a problem with the Insert trigger that I could use some help on. Here's what I have: the insert trigger for table A is __ri_insert_A() .AND. AddToB(). AddToB() is a SP that inserts data into table B, which has its own insert trigger generated by VFP RI (__ri_insert_b). This is just to maintain relational integrity with a parent table.
>
>Anyway, when I insert into table A, I get an error message when AddToB tries to insert the data into table B. I get a message that "Variable PCRICURSORS is not found" and the trigger fails. Tracing through the RI code, it seems that the PCRICURSORS variable is only created when _TRIGGERLEVEL is equal to 1. In my case, when AddToB Inserts, _TRIGGERLEVEL is equal to 2, and PCRICURSORS is never created.
>
>Anyone have any ideas ????
>TIA
>
>Rob
----------------------------------
-myron kirby (mkirby2000@gmail.com)-
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform