Information générale
Catégorie:
Codage, syntaxe et commandes
Hi,
PMJI, but what's the point of writing the new values in the audit table - after all those values are available in the 'live' data. For a quick and dirty solution why not just write the entire record of old values to the audit trail table together with a field for the GETFLDSTATE(-1) value which will let you identify which fields were changed.
Regards,
Viv
>>
old_field_value = oldval ('fieldname', 'tablename')
new_field_value = fieldname &&this is the new value for the field
I do this for every field in the table, and then store the old and new values each in their own field, with two fields per every field in the original table. every time there is a change to a field value in the original table, this stored procedure is triggered.
I was hoping there was an easier way, as my tables have a number of different fields (which makes it time consuming to create the stored procedure and also to track down the changed field in the update table). I had read about getfieldstate() and thought this might provide me an easier way, but i have not been able to get it to work.
>>
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement