Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to properly set up a view?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00542603
Message ID:
00543120
Views:
17
Create one view that joins both tables and includes the needed fields from both tables. You could parameterize the view by adding a filter on Order Number [for example]. The filter would be something like WHERE OrderNum = ?nOrderNum

WHen you open the view, you either add the NODATA clause or already have the variable [parameter] defined -- nOrderNum = 1234

Then , when the OrderNum changes all you do is:

nOrderNum = 1235
requery('MyView')


>I need to use a view with a lot of tables. For various reason but mostly
>because relations are needed to be displayed in a grid, which at least in
>vfp5 doesn't work well. I'll simplify for my example.
>
>parent child
>---------------------
>Order orderdet
>orderdet prodcode
>orderdet prodname
>orderdet prodtype
>
>Here's what I have done...
>
>View1 -> order
>view2 -> orderdet, prodcode, prodname, prodtype
>
>Then view1 relates to view2.
>
>But I'm wondering if the view should be...
>
>view1 -> order, orderdet, prodcode, prodname, prodtype
>
>...and do away with the relation.
>
>I will be appending records to the view and updating the tables.
>
>Which is the better way to do it?
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform