Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Mike Yearwood
  Where is Mike Yearwood?
 Toronto
 Canada
 Mike Yearwood
 To: Roy Slough
  Where is Roy Slough?
 Potters Bar
 United Kingdom
 Roy Slough
 Tags
Subject: RE: Method of data retrieval for grid
Thread ID: 345357 Message ID: 345360 # Views: 65 # Ratings: 0
Version: Visual FoxPro 8 Category: Grids
Date: Tuesday, May 22, 2012 9:36:42 PM         
   


> Hi,
>
> I have done some work with grids on forms using the data environment for one/two tables.
>
> Now I have to create the "Main" grid search form which will include fields from many files including several links to an application codes file where all my code descriptions are.
> i.e. a status code in the order file links to a status description in the appcodes
> a method of receipt code in the orders file links to a description in the appcodes file etc.etc
>
> So far pretty normal stuff.
>
> Now I have read that it would be better to base my grid on a Cursor of data instead of the actual tables.
>
> When I add tables to the Data Environment of the form it creates cursors with aliases for me.
> Are these the cursors I should use and then when I want to filter the records apply filters to these
>
> OR
>
> DO I build an SQL statement in the code and then re-query when the user selects different selection criteria.
> (If so where do I put this SQL statement as when I run the form it either gives an error OR displays data from the most recent table opened)
>
> SO in summary, I could write a long SQL statement bringing in all the fields and making the links necessary, but how do I link the grid to it OR what method should I use.
>
> Thanks

Door # 2. Search for Andy Kramek's safe select technique.

Mike Yearwood
Microsoft MVP Visual FoxPro 2008, 2009
We have enough youth. We need a fountain of smart!
There may be many ways to skin a cat, but there are very few right ways to do it.

ENTIRE THREAD

Method of data retrieval for grid Posted by Roy Slough @ 5/22/2012 9:16:05 PM
RE: Method of data retrieval for grid Posted by Mike Yearwood @ 5/22/2012 9:36:42 PM
RE: Method of data retrieval for grid Posted by Anders Altberg @ 5/23/2012 12:48:32 AM
RE: Method of data retrieval for grid Posted by Cetin Basoz @ 5/23/2012 2:19:09 AM
RE: Method of data retrieval for grid Posted by Jun Tangunan @ 5/23/2012 4:16:30 AM
RE: Method of data retrieval for grid Posted by Cetin Basoz @ 5/23/2012 11:31:46 AM
RE: Method of data retrieval for grid Posted by Jun Tangunan @ 5/24/2012 12:06:38 AM
RE: Method of data retrieval for grid Posted by Roy Slough @ 5/23/2012 12:32:11 PM