>>>OTOH I couldn't understand why you ever need a view for a single table when it's local (actually never understood why someone might need it).
>>>Cetin
>>
>>Çetin,
>>
>>I need a view for a single table, when it grows over several scores of thousands of records. The reason has to do with an inefficiency of VFP, when combining a filter and a grid. It seems no R.Optimization is done here.
>>
>>With a view (parameterized, of course), the data is retrieved and shown very fast, compared to a filter.
>>
>>This situation occurs, typically, in parent-child forms (the child form shows all data in a child table that is related to the selected parent record, for instance, all invoices for one client, or all clients in one city).
>>
>>The parent and child grid might be on the same form; I think this doesn't make much difference.
>>
>>Hilmar.
>
>I never have been a fan of filters but there is set key or relation :) Why would I need a view for that.
>Cetin
Cetin,
In my situation, SET KEY or Relation would not work. A little bit more specific. Parent table (BatchCntrl) contains DsID, ExtrYear, ExtrWeek fields + lots of others. It's filtered by current week (here I can use SET KEY - good idea). FilingDate table is child, displayed in a grid and should show 4 last extrweeks periods (relation by DSID). The form should have a switch, so I can show all DsIDs for the particular state (not only for the parent table - this wat we'll see missing data). I don't see a way to filter the child grid without using filter... View seems like a simple approach. What would you suggest?
If it's not broken, fix it until it is.
My Blog