Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Frustration with private dataset not saving
Message
From
20/10/2010 15:37:59
 
 
To
20/10/2010 09:39:37
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Miscellaneous
Thread ID:
01486018
Message ID:
01486374
Views:
76
>>You can perform a REPLACE on a table that isn't the currently selected table without using the IN clause, if you prefix the columns with the appropriate alias:
>
>While you can do that, it's not a good idea and it runs the risk of not behaving as you expect. You're at risk if the current work area is at end of file, and you may not see what you think you will if any of the work areas are at EOF.

That's what I illustrated with my code samples.

>In my view, no REPLACE should address more than one table,

For the sake of simplicity, readability and maintainability, agreed. Break the rule only if you understand the potential consequences, and test thoroughly ;)

>and every REPLACE should include the IN clause.

... as I said in my first message in this thread.

>For that matter, every Xbase command that accepts it should include the IN clause.

Agreed.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform