Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update multiple records
Message
De
03/03/2021 16:26:06
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01678694
Message ID:
01678729
Vues:
36
>>>>This is all true for single records as well, but then I do not need to think about OTHER records too .... For a single record it is (just) refresh of the CA, and display the current value. User might remember data of a single, last, record. But many. Shudder.
>>>
>>>Thank you for much for the detailed list of items to consider.
>>>
>>>For me one more should be considered. Usually, when a user updates one record my BIZ object records which fields were changed, values before and after. When updating multiple records, I will need to account for these changes too (for each record). I don't know the details of how I will do it. Right now, I am just working on the time (cost) estimate of such a feature. I think once the customer sees the estimated cost, they may want to continue making changes one record at a time :)
>>
>>VFP solution
>>After CursorRefreh (Simple SELECT * FROM .. TO CURSOR curBefore NOFILTER)
>>Before Tableupdate ( SELECT * FROM .. WITH (BUFFERING = .T.)TO CURSOR curAfter NOFILTER )
>>Result in a dataset before and a dataset after the change ....
>>Then you can do some SQL to filter out changes etc.
>
>in my case everything should be done using my BIZ object. This way, audit trail is preserved.

Lutz already showed one possible solution - but if the cursor is huge and only few recs are changed, wasteful.
See GetNextModified as alternative, GetFldState as appoach for bizobj audit trail, oldval() in trail...

my 0.02€
thomas
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform