Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP RI builder - examples of custom error messages
Message
From
01/02/2002 15:02:04
 
 
To
01/02/2002 13:34:14
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00614171
Message ID:
00614234
Views:
18
This message has been marked as the solution to the initial question of the thread.
Hi Andrew.

>Does anybody have any examples of how to implement Referential Integrity as defined by the VFP RI Builder into a form?
>
>I have set RI up using the builder, and now when I try to delete a record that should fail due to trigger rules, I just get a messagebox "Trigger Failed". Searching the code in the Database stored procedures this isn't among the messages that I can find.

That message is coming from the VFP error handler. If you use buffering, you can call TABLEUPDATE() to write the changes to the tables. Then, instead of getting an error message, TABLEUPDATE() will return .F. You can then use AERROR() to see what went wrong. For example, error 1539 is the trigger failed error, so you can check for that and handle it yourself.

Doug
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform