Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Andy Kramek
  Where is Andy Kramek?
 Hot Springs Village
 Arkansas - United States
 Andy Kramek
 To: Russell Hill
  Where is Russell Hill?
 Sydney
 Australia
 Russell Hill
 Tags
Subject: RE: Grids, indexes & filters
Thread ID: 155117 Message ID: 155151 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Wednesday, December 26, 2007 12:16:00 PM         
   


> Hi all,
>
> What are the pros and cons of using indexes & filters on a Cursor which is the RecordSource for a Grid?
>
> The user needs to be able to sort the Grid on any of it's columns and also filter out subsets of data.
>
> I'm not so much concerned about sorting the data (presumably I just use INDEX ON or SET ORDER TO) but should I:
>
> 1. Use XBase SET FILTER TO commands on MainCursor
>
> or
>
> 2. Use SQL SELECT statements FROM MainCursor INTO FilterCursor and change the RecordSource of the Grid?
>
> Are there any known issues with either strategy?

Versions of VFP prior to VFP had serious issues with using filters in grids - though less so on cursors than on tables. So I would always use SQL but instead of changing the recordsource use the "safe select' technique described in my blog here: http://weblogs.foxite.com/andykramek/archive/2005/03/19/174.aspx


Regards
Andy Kramek
Microsoft MVP (Visual FoxPro)
Tightline Computers Inc, Akron Ohio, USA

ENTIRE THREAD

Grids, indexes & filters Posted by Russell Hill @ 12/26/2007 9:15:34 AM
RE: Grids, indexes & filters Posted by Andy Kramek @ 12/26/2007 12:16:00 PM
RE: Grids, indexes & filters Posted by Russell Hill @ 12/26/2007 7:52:25 PM
RE: Grids, indexes & filters Posted by Cetin Basoz @ 12/26/2007 6:11:39 PM
RE: Grids, indexes & filters Posted by Russell Hill @ 12/26/2007 7:52:53 PM