Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why Reserved Words Are a Problem
Message
From
06/09/2001 11:00:11
 
 
To
06/09/2001 10:47:03
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00553031
Message ID:
00553142
Views:
15
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.


>>Hi Renoir,
>>I do think the VFP parser does a great job of figuring out what is meant. I used to shy away from using Type, Class, and Name, but I've not ever had a problem with them, so now I use them. The big issue to me is that these words are very compelling names and it's good to be able to use them freely. Some like to use prefixes which I find completely unreadable. I prefer real english words that communicate the developer's intent.
>>
>
>I general, VFP reserved words are ok, SQL reserved words are _not_. The distinction is very important.
Daniel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform