Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DBC UPDATE Trigger to set lastUpdated Column Value
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01687206
Message ID:
01687208
Views:
36
>Hi,
>
> You can set rule for record validation: LastUpdate_rule()
>
>And add procedure to "Stored procedures":
>
>PROCEDURE LastUpdate_rule()
>REPL LastUpdate WITH DATETIME()
>RETURN .T.
>
>
>MartinaJ
>
>>Hi all -
>>
>>Unfortunately my memory is failing me, as I am not remembering much of what I used to know about DBC triggers in Visual FoxPro. Can a DBC trigger update the same table that fired the trigger? I'm wanting to use a DBC to ensure a table's LastUpdate column is updated every time an update is made to any column or the row is marked for deletion. Is that possible?
>>
>>And if not, what would a decent work-around be?
>>
>>Thanks!

Hello Martina -

Thanks so much. I appreciate the help!

Interestingly the Record Validation rule will not fire when a record is simply marked for deletion. Worse case I could set a DELETE TRIGGER and log such deletions. Using both the "last updated" column and the log would allow for reporting of all changes and deletions (adds will be handled via a column default value) after a given datetime value. I think that will work.

Thanks again.
________________
_____/ Regards,
____/ al
________________
_____/ Regards,
____/ al

___________________________________________
www.jcn-associates.com
Visual FoxPro Database Application Development and IT Project Management
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform