Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET RELATION question
Message
From
18/11/1998 08:59:41
 
 
To
18/11/1998 08:54:36
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00158705
Message ID:
00158707
Views:
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.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform