2008/4/15 Allen <[EMAIL PROTECTED]>:

> Im sorry to say you may have missed the VFP is finished posting from M$.
> Im
> very sorry to say that like others here I have started to go .net and it
> upsets me too. However I am not sure what to make of Linq and even if I
> need
> it with the free SQL express. Still so much to learn. For information, my
> reason for part ng ship is because of poor support for complex web
> services
> in VFP. Don't argue with me if you disagree, argue with Rick Strahl. Still
> VFP will be good for non web jobs.

*--------------------------------------------------------

Linq is the tool that SUB Queries objects or interacts with other Query
Engines (SQL Server only as of now) to get you what you want.  It does not
replace the db engine that maintains your data.  (mySQL, SQL Server, yada,
yada, ....)

Linq is kind of like using a where filter with a view you create

Select guid, DisplayName, ListPrice from ClearanceItemsView
where ListPrice < 25

You may have 25 cols in the view.  A class is created for holding the data
when you drag the view name from the server onto a LinqToSQL class
designer.

You then put your linq syntax together to grab what you want out of the
potential dataset.

  myDataContext db = new myDataContext();

                var ClearanceItems = from d in db.ClearanceItemsViews
                           select new { ID = d.Guid, Name = d.DisplayName,
Price = d.ListPrice };

You now have a container ClearanceItems that you can bind to any control
that you want, per say.

If you wanted to see the gross profit you would just do a foreach loop to
iterate through the object:

foreach (var item in ClearanceItems)
                {
                    sendit = itemid.ID.Value;
                    dd = ClearanceCalculator.Calculate(sendit);
                    Console.WriteLine(dd);  // show the gross profit per
item at clearance price.
                }



-- 
Stephen Russell
Sr. Production Systems Programmer
Mimeo.com
Memphis TN

901.246-0159


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to