Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Triggers
Message
 
 
To
17/09/2002 12:53:36
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00701299
Message ID:
00701384
Views:
18
>Nadya,
>
>Yes, I know the deleted() does not work (see towards the bottom of my first reply). The record validation is not invoked when a record is deleted.
>On the other hand, the trigger is invoked for a delete but won't let you changed the record.
>
>
>options
>(1) Do you need the D ? can you test for deleted() ?
>
>The record validation fires when a deleted record is recalled.
>
>In short, the record validation is only fired when the contents of a record have been touched or record recalled
>
>Why do you need the D ?
>

In all our tables we have ModiType field with 3 possible values in it (A/C/D). These flags are updated in a complicated code. Another table has this field as well, so I thought, it would be a good idea to keep the same convention here. It looks like this update could not be done automatically on Table Level, so I have to put a special code in Delete method of the form...


>(2) keep a log table somewhere. this can be done with the triggers, although I'm not in favour of that for just a flag
>
>(3) Instead of a flag, add 2 datetime fields, One for dateCreated, and one for DateLastModified (Overkill)
>
>
>(4) ???
>
>>Hi again,
>>
>>It works, but deleted() doesn't work, e.g. I can not automatically set a "D" flag.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform