Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CLR and VFP
Message
De
31/08/2000 03:12:47
Walter Meester
HoogkarspelPays-Bas
 
 
À
30/08/2000 13:44:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00409695
Message ID:
00411180
Vues:
18
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,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform