Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trigger Messages
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00209539
Message ID:
00211473
Vues:
31
>>Has anyone figured out how to prevent the 'Trigger Failed' messagebox from appearing when a database trigger fails. I'd prefer to handle the failed errors myself.
>>
>>TIA
>>
>>Dan
>
>Dan,
>
>I am using xCase to generate my RI code. Since it is based on a template language and we have access to it, it is easy to remark the line that will send an error message. That's what I'm doing actually, and the framework processes the error just as any other.
>
>José


I appreciate the responses but should have provided a more clear example. I have a logical sequence of events that a document that is being tracked can go through (created, printed, issued, cancelled, voided, redeemed...). Each time that a status changes, a history record is created that shows datetime, new status and user involved. This history record is created using the update trigger for the main table; when the status field changes I fire an update trigger that verifies that 1) the status is a valid value (could use field validation) and 2) that the new status being assigned is valid relative to the current status (i.e. a voided record could not have its status changed to redeemed and a document could not be printed before it is created). Returning .f. from the trigger prevents invalid statuses from being set but also displays the VFP messagebox 'Trigger Failed'. Not only is this not visually desireable, I'm sure that it will present problems when the database is accessed from another client package (i.e VB).

Any ideas?

Dan
Dan
St. Petersburg, FL

"I started out with nothing and I still have most of it left"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform