Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why doesn't this DELETE ALL WHILE work?
Message
From
27/08/2003 12:08:53
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
27/08/2003 12:06:08
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00823822
Message ID:
00823838
Views:
22
This message has been marked as the solution to the initial question of the thread.
>>The following code does not delete from the DRAW table the records where draw.obligor == m.obligor .AND. draw.obligation == m.obligation .AND. draw.unit == m.unit. After the SEEK the record pointer is correctly on the first matching record. Then after the DELETE ALL WHILE is executed the record pointer is at the first record of the index and the matching records are not deleted.
>>
>>
>>IF SEEK( m.obligor+m.obligation+m.unit, "DRAW", "obr_obn_un")
>> SELECT draw
>> DELETE ALL WHILE draw.obligor == m.obligor .AND. ;
>> draw.obligation == m.obligation .AND. ;
>> draw.unit == m.unit
>>ENDIF
>>
>>Thanks
>>
>>Brenda
>
>Change DELETE ALL to DELETE REST. DELETE ALL will go back to the top.

I think you can also omit REST - the WHILE clause makes this implicit.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform