Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need General Advice On Views.
Message
From
21/11/1999 23:36:24
 
 
To
21/11/1999 22:40:36
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00293794
Message ID:
00293806
Views:
32
>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.
>
>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

Just a few rather general points that might help: (all points are related to local views only)

1. My understanding is that VFP can reliably update only one table in any given view. If, within a single container/business object you need to update more than 1 base table, you'll have to use separate views. OTOH, in some cases you need to look at information from related tables in a read-only fashion while you make changes to another. Views work very well for this.

2. The View Wizard is simply a user-friendly front end for the CREATE SQL VIEW command. That command can create some incredibly complex views by directly using SQL syntax. You can also check out Erik Moore's eView utility in the Files section.

3. Just a very general comment here - linking child objects or forms reliably to a parent is a non-trivial process. Simplifying this is one of the strong points of all of the commercial VFP frameworks. Have you looked into them at all, or are they not suitable for your needs?
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform