Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
REPLACE question
Message
From
30/09/2003 20:08:38
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00833626
Message ID:
00833666
Views:
21
Nice clear simple explanation, Dan. I wish I was so gifted.

Thanks

>REPLACE is a scoped command. The default scope is NEXT 1. Without the IN clause, the scope is evaluated in the currently selected workarea. If the currently selected workarea is at EOF() there *is* no NEXT 1, so nothing happens.
>
>
>>What you are probably seeing is a known and standard (but hard to explain clearly) aspect of VFP (and FPD/FPD and dBASE before that).
>>It has to do with the currently selected table itself being at EOF().
>>
>>VFP gave us the REPLACE IN Obligat field1 with m.xxx...
>>construst to circumvent this.
>>In other words, use the IN clause of REPLACE to 'tell' VFP that you want the data updated there regardless.
>>
>>good luck'
>>
>>>I am in the debugger and can see that hold_totlndisb = 4123 and that obligat.totlndisb = 1221. The following REPLACE statement does not change the value of the obligat.totlndisb. In the debugger if I change the selected table to be obligat, then the value is changed. And it seems from past experience that the REPLACE does work sometimes. What is up?
>>>
>>>REPLACE obligat.totlndisb WITH hold_totlndisb
>>>
>>>Thanks
>>>
>>>Brenda
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform