Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CLR and VFP
Message
From
31/08/2000 03:12:47
Walter Meester
HoogkarspelNetherlands
 
 
To
30/08/2000 13:44:25
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00409695
Message ID:
00411180
Views:
17
Hi Erik,

>>cCommand = "REPLACE "+cField+" WITH "+cValue+" "+cForClause
>>&cCommand
>
>>Are there any alternatives to this problem ??
>
>This is exactly the type of situation where people are too quick to use macros.
>
>REPLACE (lcField) WITH lvValue FOR (lcExpression)

This does not work. You can't use FOR (lcExpression). Even if you could, you still have to check if there IS a for and/or while clause etc.

A REPLACE command is not the equivalent of a SQL command. There are too much difference to replace all REPLACE with a SQL UPDATE command. For example: SQL UPDATE does not work with buffered data (Or does it ?).

It seems almost a bug, but why does the SQL-INSERT command respects data buffering, and why SQL-SELECT does not ???

What I'm trying to say is, without macro substitution you'll loose one of the most powerfull and valuable VFP features (maybe because many other languages don't have this).

When you'll say that there are cases where macro substitution is missused, I inmediately agree. However, when used correctly it is a very powerfull feature. I certainly hate to see, the VFP team spending time on loosing functionality and we are not sure what to gain....

Walter,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform