Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SCAN FOR SEEK() or SCAN WHILE SEEK()
Message
From
07/07/2001 17:07:34
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00527736
Message ID:
00527818
Views:
28
If the purpose of the excercise is merely to DELETE records, you could try the following approach ...

If Seek('SomeValue')
Delete Rest While KeyValueColumn == SomeValue
Endif

No need for the SCAN/ENDSCAN to delete. The table obviously must have its index TAG set to the SEEK value. The above syntax will delete the records that match in one line and will not lock the table.

HTH

>I am posting this again cause I dont know where this message went and I am not ble to search it using the search facility provided by UT.
>
>What would you suggest is the right and fast method of the two:
>
>
>SELECT <mydbf>
>SCAN FOR SEEK(<expr>)
>   SELECT <otherdbf>
>   ...
>   ...
>   ...
>
>   SELECT <mydbf>
>   DELETE
>ENDSCAN
>
>                        OR
>
>SELECT <mydbf>
>SCAN WHILE SEEK(<expr>)
>   SELECT <otherdbf>
>   ...
>   ...
>   ...
>
>   SELECT <mydbf>
>   DELETE
>ENDSCAN
>
>
>Thanks in advance for any suggesstions
-=Gary
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform