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:
01070126
Views:
18
Thanks, yag, for the quick feedback!

> 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.

Well, I read all I could grab two months ago, including Anders´ paper on it, which clearly states it *are* *methods*. As it´s based on the .Net framework it MUST be OO.
My doubts may stem from that the T-SQL Select syntax simply doesn´t look and feel like OO *at all*. ;-)

OTOH the SQL syntax allows for much fewer lines.

> dim results = numarray.Select(n).where(n < 7).Sum()

Guess I didn´t fully comprehend this strange intermediate syntax with the methods chained like pearls, each with their arguments.
That´s why in my Fox example implementation I only have *one* method (Select) and the arguments to it are stored in properties, which is fairly close to usual Fox syntax, like, say, a Data Adapter.

And: What I show in the Fox sample I think could be a relatively easy way to do quite some real LINQ in VFP9, without having to wait to 'inherit' something from VB9 in Sedna. < g >

Hope curiosity won´t have killed me when we´ll see what we´ll be finally able to do with LINQ and the Orcas CLR / VB9 in SQL Server, instead of hearing about the limited use of 2005 in SS! < g >

Hope you´re thinking along those lines a lot.
Thanks for the feedback.
G
Previous
Reply
Map
View

Click here to load this message in the networking platform