Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Views
Message
De
04/11/1998 23:42:07
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Views
Divers
Thread ID:
00154664
Message ID:
00154664
Vues:
63
I need help setting "views" in a form.
I have a form with a page frame and two pages. One with detail records and another containing a grid.
I need to be able to view the data, say Names.dbf, either completely or "filtered" to only those key values contained in a selected table whose name will vary, but call it the "Query" table. There is a whole set of "query" tables predefined that the use can choose from a popup. The popup is outside the pageframe, so can be changed either while details or the grid is displayed.

So Names.dbf might contain fields pkey i, name c(40), town c(30)... etc, but all the query tables only contain a single field pkey i. Get the idea?

So how do efficiently set up an editable view which is essentially either..

SELECT * from Names where pkey in (select pkey from "query") && where "query" can change
or
all records in Names if user chooses no filter.

I can handle the SQL but how do I parameterise the view expression?
How do I change the source of the grid to match?

You see if I did this in FPW 2.6 it's simple, it's fast, I wouldn't even need to run a query, just set a relationship from Query into Names, and that would work in the browse as well. But I'm not sure on the best approach in VFP.

I'm sorry this is a complicated question, but it's a sort of design structure that comes up often in my sort of apps. So would really appreciate a jump start.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform