Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update multiple records
Message
 
 
To
03/03/2021 16:26:06
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01678694
Message ID:
01678735
Views:
31
>>>>>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

I like GetNextModified. Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform