>>>>>* This does not work, no error gets shown, but the replace command
>>>>>* does not put anything in the field
>>>>>REPLACE prceng.prcpqtyby2t WITH THIS.LIST(THIS.LISTINDEX,1)
>>>>>
>>>>>* This works
>>>>>SELECT prceng
>>>>>REPLACE prcpqtyby2t WITH THIS.LIST(THIS.LISTINDEX,1)
>>>>>
>>>>>Is this a bug, feature, or my misusing a replace on a table that is not selected?
>>>>
>>>>Add the IN prceng to the end. VFP has a peculiar behavior that if you are sitting at the end of the file in your current area and you attempt to replace in another work area, the replace will fail.
>>>>
>>>>HTH
>>>
>>>Is this a feature of a bug that has not been caught yet?
>>
>>In the hacker's guide, there was an explanation that I don't recall. I believe its a feature. :)
>
>I have the Hackers guide and I looked it up and you get the award for best memory in the category of big books. Yes they do explain it as a feature not a bug. So I guess the best thing to remember is to select the table before the replace or use the IN clause. Thanks for your help and all others.
It's also clearly documented in HELP:
"Note If the IN clause is omitted, no replacement occurs if the record pointer is at the end of the file in the current work area and you specify a field in another work area."
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only