Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why Reserved Words Are a Problem
Message
De
06/09/2001 11:13:52
 
 
À
06/09/2001 11:05:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00553031
Message ID:
00553152
Vues:
17
Erik,
There's an easy work around:
update test set test.from = "2"
update test set test.order = "2"
update test set test.group = "2"
update test set test.having = "2"
This was the only way to work around SQL keywords in fox2.x

Again, I never use reserved keywords since it's not predictable how the parser will interpret the code. With syntax coloring, it's fairly easy to avoid keywords.

>>Erik,
>>That's what I thought, too. However, I've just run a (silly) test and to my great surprise the following works correctly in both VFP6 and VFP7
>>
>>
>>CREATE CURSOR test (select C(1), from C(1), where C(1), order C(1), group C(1), having C(1))
>>INSERT INTO test VALUES("A","A","A","A","A","A")
>>INSERT INTO test VALUES("1","1","1","1","1","1")
>>INSERT INTO test VALUES("B","B","B","B","B","B")
>>SELECT select, from, where, order, group, having FROM test ORDER BY order
>>
>>
>>Using SQL keywords in a Fox2.x query caused problems.
>>
>>Please note that I'm *not* advocating to use reserved key words, but thought that it is interesting that the VFP parser is really quite sophisticated and able to handle such stupid queries.
>>
>
>Try these:
>
>update test set from = "2"
>update test set order = "2"
>update test set group = "2"
>update test set having = "2"
Daniel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform