Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do I need to release array of SCATTER/GATHER?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01550168
Message ID:
01550244
Vues:
75
This message has been marked as a message which has helped to the initial question of the thread.
>Doesn't GATHER create array?

In my opinion it is much better to use SCATTER/GATHER NAME, which will create an object with the same properties as the fields in the table.

ie
LOCAL loRecord

USE Table && has fields PK, field1 and field2
SCATTER NAME loRecord MEMO

*** Now you can use it to replace or insert into another table

USE Table2 
GATHER NAME loRecord MEMO && Replace a record or

loRecord.PK = NewPK()

INSERT INTO Table2 FROM NAME loRecord && Inserts a new record


* at any time you can address or set the value of this properties as you would with any other object

loRecord.Field1 = 'NewValue' && etc.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform