Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WRONG way: SQL Select in VB - use METHOD!
Message
General information
Forum:
Visual FoxPro
Category:
VFPX/Sedna
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01069681
Message ID:
01072457
Views:
14
>Hey Guenter,
>
>You should read the LINQ docs - you'll see that all the query operators *are* methods. Then, each language layers a set of query comprehensions on top - which are the more SQL (VB) or XQuery (C#) like syntax. So, you can use either one, or both together:
>
> dim results = Select sum(n) from n in numarray where n < 7
>
> or
>
> dim results = (Select n from n in numarray where n < 7).Sum()
>
> or
>
> dim results = numarray.Select(n).where(n < 7).Sum()
>
>This is all pseudocode, but basically this is what you can do. Personally, I like the first one. <g>
>
>yag


I like the first one too (I guess most everybody here would). Why are they doing this? Is MS trying to mess up our heads? I'm getting to old to have to learn to write aberrations like #2 or #3 when #1 works fine, thank you very much! <bg>


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Reply
Map
View

Click here to load this message in the networking platform