Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Last Updated User
Message
 
 
To
19/02/2005 04:19:45
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
00988451
Message ID:
00988633
Views:
56
>Nadya,
>
>I think you can do so in the RecordValidation rule of the base tables
>
>You can use getfldstate(-1)
>
>For inserts, just replace tLast_Updated_Date and cLast_Updated_User
>
>For updates, loop using getfldstate(-1) and if getfldstate(-1) indicates a change for a field, compare the fieldvalue to the oldval() in case a field is changed and reset to its old value
>
>The only drawback is that the RecordValidation rule does not fire for a delete as far as I can see. Don't know whether that is a problem for you
>

Hi Gregory,

Sounds like a good approach and it would not affect the existing records. The only problem that we have lots of tables and we're using Stonefield. I know how to write a program to update all tables automatically, but I'm not sure how to incorporate it with Stonefield. I'm going to discuss this idea in details with my colleague. Right now he decided to update framework to put some code to update these fields in Save method. However, it would not work for my case if I'm updating multiple tables at once. I found that field_a and field_b works, but I don't want to rely on this naming convention.

Thanks again.
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