Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tableupdate() first parameter
Message
 
 
À
12/04/2015 14:30:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01618234
Message ID:
01618246
Vues:
36
>>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

Thank you for your input and suggestions. I decided that since the logic only calls for one (1) record that should be affected before the Tableupdate(), I am changing the parameter value from 1 to 0. This way, I don't have to introduce new code to check for the record pointer or other things.
"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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform