Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A neat little 'gotcha' in VFP
Message
 
 
To
29/06/2006 09:13:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01132511
Message ID:
01132696
Views:
20
>I agree with Calvin. Perhaps we are giving too much emphasis on using m dot with variable. I agree that the command -- lnCounter = m.X will definintely not refer to the field X from the current table and lnCounter = X may use value from the field X. But what will happen if there are multiple tables having field 'X' open . Do we know field from which table will be used? (Depends on which one is selected).
>
>Consider the code
>
>USE FIRST in 0
>USE SECOND IN 0
>GO TOP
>REPLACE CODE WTIH '123'
>
>Will it replace the Code field in the FIRST table or SECOND or in someother table? Isn't there is a strong case for using table prefix (e.g. REPLACE FIRST.CODE) in commands?

No, it's a strong case for using IN clause in REPLACE. Using table prefix wouldn't help if current alias is at EOF.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform