Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP new bug: UPDATE with SET RELATION fails
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00588420
Message ID:
00588557
Views:
21
>>The bug appears is that vfp sql optimizer takes eof() function as constant
>>expression and thus refuces to run UPDATE command.
>
>>If EOF() is initially .T., update command runs and updates correct records.
>
>I don't think this is a bug. A WHERE clause creates a filter condition (which is like a constant expression) that will become a yardstick that will be used to determine what records should be included in the result set or acted upon. In this case RCursor was at EOF, and seeing that VFP didn't have to go any further to determine that 0 records would meet the filter condition.

In this case please explain while following SQL UPDATE updates one record under the same conditions.
 UPDATE Cursor1 ;
    SET Field1=Field1 ;
    WHERE !EOF('RCursor') 
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform