Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need General Advice On Views.
Message
 
À
21/11/1999 22:40:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00293794
Message ID:
00294639
Vues:
23
>I have been told over and over that I am much better off in developing a multi-use application using views for data input forms. I accept this advice as sound especially in protecting the original tables and for security reasons. However, I have never been very successful in using views on forms that use multiple views of both parent and child tables.

1) Views Rule!

2) Think of a view as a subset of the data, or it's a lookup for validation.

3) parent and child views are easy to manipulate.

4) I use pagefames on almost every form, and each page has it's own paramterized view.

Case in point: Customer lookup form
Page 1 is lv_cust, 2 columns Custno and Company Name display and primary contact data is not displayed on the grid.
Page 2 is customer address(s) and multipliers. It uses 2 views for this. lv_cust_shipto and lc_cust_FULL

here is the code for CUST_FULL
CREATE SQL VIEW "LV_CUST_FULL" ;
AS SELECT * FROM f:\pro30\ardata\arcust01 ;
where arcust01.type< '99' and arcust01.custno= ?vp_custno

The grid rowchange envent populates the vp_custno. Activate page event is just
sele lv_cust_full
requery()

I would recommend the Mere Mortals Framework at this time. It's is based off using views and switching between VFP & other back ends easliy.

__Stephen






>
>There are two approaches that have been suggested: 1) to duplicate all my tables as views, and then create my form(s) as I would using the views in place of the tables; 2) create one view incorporating all the tables I need for the form. The problem with the second suggestion is the view wizard won't allow more than two tables to be included in a view. I end up creating multiple views built on other views using a series of outer joins. This creates some problems in navigating through records.
>
>The first solution would seem to make some sense, however when I try to create a form using more than one view I again have serious problems trying to navigate. This is especially true if I try to use a Pageframe with each page used to display information on a different view. Or even worse if I try display information from more than one view on the same page. [I know this is blasphemous on UT but what I am trying to do is mimic the way Access allows you to use subforms, so I can navigate through the records in my parent table or navigate through the records of a child in a single Parent record] I know there has to be a way to do this in VFP6.0.
>
>If you can offer any help or advice I would greatly appreciate it. Thanks. --Lincoln
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform