Versions des environnements
Network:
Windows 2008 Server
>I understand that the first parameter passed to Tableupdate() defines if update is done to current record (0) or all records (1).
>
>I have a situation where I found in my code that the value of 1 is passed to the Tableupdate(), even though, according to the logic of the program only one record is changed or added. My question is, in which order VFP updates all records (if the parameter is 1). That is, if it updates processes all records in some kind of an order, it is possible that the last one "processed" won't be the one being changed or added. Is this correct?
Yes. Not certain if the order of updating can be controlled via a field with dtChange controlling the order. Easy to check ;-)
>The reason I am asking is that immediately after Tableupdate() the program "uses" a value in the cursor. And if the last processed record is not the one being edited or added, prior to Tableupdate(), I need to change the parameter from 1 to 0. But if the last processed record is always the one that was just changed or added, changing parameter from 1 to 0 is not necessary.
Could be handled in code in CA hooks if guaranteed that .CursorUpdate is only called when sitting on that particular record
Précédent
Suivant
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