Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't update the &%!#@ field
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00051833
Message ID:
00051863
Views:
34
>I just changed the code to select before the replace. No help. I know that in other places in my app I replace in other work areas all the time, so I experimented in the command window just to be sure:
>
>USE table1 in 0
>USE table2 in 0
>sele table 1
>replace table2.field1 with "ZZZZZ"
>
>This works fine. The table gets updated no problem.

The tricky thing about replacing into another work area is that most of the time it will work. When it fails it generates no error message. The problem occurs if table1 is at EOF. The replace will fail in this case. The safe way to do a replace is select the table first. In VFP you also have another option, add the IN TableAlias clause to the replace (REPLACE Field1 WITH "ZZZZ" IN Table2).
Steve Ruhl
CitiMortgage, Inc.
steven.ruhl@citibank.com Office
Steve@steven-ruhl.com Home
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform