Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP new bug: UPDATE with SET RELATION fails
Message
From
02/12/2001 10:42:17
 
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00588420
Message ID:
00588500
Views:
14
>Andrus, I ran the code and inserted
>
>WAIT WINDOW IIF(EOF("RCursor"), "At EOF", "Not at EOF")
>
>after the SET RELATION command and RCursor was at end-of-file prior to the UPDATE statement. So the 0 result looks correct as the !EOF() in the WHERE clause was false.

During VFP UPDATE command, related record pointers are moved also.
If you simply change the order of two INSERT statements, only the correct
record is updated.

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.

The same problem is with SQL SELECT statement.

use mytable in 0
select recno('mytable') from mytable

produces constant recno() values.

However, if mytable is not opened prior to select:

use in mytable
select recno('mytable') from mytable

recno() works correctly !

Does'nt this smell like another bug ?
Andrus
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform