General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
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