Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Confused about Buffering and TableUpdate
Message
From
17/04/2001 13:42:17
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00495972
Message ID:
00496235
Views:
9
>>Before you get too carried away with TABLEUPDATE(), it looks like you might want to use DELETE ALL as indicated above. Remember that the default scope for DELETE is NEXT 1, so unless the record pointer happens to be on the record you want to delete in tables 2 and 3, nothing will happen.
>>
>
>Actually the FOR clause replaces the ALL scope in the delete. All records that apply to the criteria will be deleted. If a WHILE clause were usede and the record pointer was not sitting on a record that applied, then no deletes would take place.

Feh. You're right. Personally I use DELETE only with a NEXT 1 scope. I'm actually a little surprised that the scope with a FOR clause is ALL, as that seems inherently "dangerous". FWIW I always explicitly specify scope on those commands that accept it, and I use DELETE - SQL on the odd occasion where I need to delete multiple records at once.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform