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

Click here to load this message in the networking platform