Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing parametrized view on the fly (find form)
Message
De
19/04/2000 16:31:46
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvanie, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00361044
Message ID:
00361550
Vues:
19
>Man! I wish I could come up with a better example. What if you definitely needed to get the data from different tables every time this form ran?

Create view MyView as Select * from (?variableTableName)
displaygrid.recordsource = MyView
?variableTableName = "c:\local.dbf" | "h:\network.dbf"
=Requery("MyView")

Does this do what you want? I haven't tested it.

A view is by definition designed to "view" a subset of the tables IN THE DATABASE where the view resides, rather than free tables. To create a general table-viewer form to view any table on disk is not really what a view was designed for.

This would quickly go towards a data design conversation, but i'll spare you because i really don't have time today. If you're developing the app from scratch, take the extra time to make a really good data model before doing the serious form design. (then make a dummy form to make sure the data works well) When the data is working correctly, the form is a lot easier to implement. If you're working with someone else's data model, and trying to add a feature, then my suggestion is to do less rather than more- otherwise you will end up re-writing the form on a data model you don't have control over...

HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform