Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SET RELATION question
Message
De
18/11/1998 09:22:12
 
 
À
18/11/1998 08:59:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00158705
Message ID:
00158720
Vues:
20
>>I am importing data and need to validate that a certain
>>field contains valid codes.
>>
>>It is my understanding via experiments that SET RELATION
>>is inherently faster than performing a SEEK(). The data
>>is sorted based on another key so the code I am evaluating
>>comes in a non-sorted order.
>>
>>After APPENDing the data to a new cursor and indexing
>>the cursor (again NOT on the code field) I do a
>>SET RELATION TO code INTO codelookuptable ADDITIVE
>>
>>After that I do a GO TOP in the parent (imported data)
>>table. Is the GO TOP required to kick the relation in
>>gear. I had a problem on a long process that gave me
>>an error message stating that one of the valid codes was
>>in error.
>>
>>Should I do a GO BOTTOM then a GO TOP prior to SCAN ...ENDSCAN
>>on the parent table?
>>
>>Not sure why I have trouble with set relation....
>
>Actually, SET RELATION is slower than SEEK() and better be avoided. It's mostly because using SEEK() you really know where you make mistakes (if any), and using SET RELATION you have to guess what is wrong.

While I would agree that SET RELATION is not as straight forward
as a SEEK(), there is NO question that SET RELATION is considerably
faster when dealing with large tables. That is why I am putting
up with SET RELATION...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform