>
>I have spent a lot of time with this issue and have found something very interesting. I added a suspend at the top of RI_INSERT_mytablename and stepped though the entire code with the debugger. Guess what? I was allowed to add a record! If I remove the suspend, guess what? I get "trigger failed" again! I have been able to repeat this several times.
>
>I understand the intent of this new code which was added to the RI Builder in VFP9, but I can not understand why it causes "trigger failed" on a handful of my tables.
>
The results of your "exercise" would be interesting if you could prove that the record was free at the time the trigger failed, but not otherwise. It is expected that the trigger fails If the record or the file is locked by another client (another data session). The trigger could succeed under debugger just because the record happened to be free at the time. You may consider changing SET REPROCESS setting to make sure VFP will attempt to lock the record several times before declaring the failure.
>To get around this for the time being, I have modified the RIBUILDR.APP to include these new lines of code as commented lines. All seems to work ok after doing this.
>
>Let me know if you have any other thoughts about this.
>
That is up to you, but doing so you can end up with records without a parent. Do you need RI code at all?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only