Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When should I create my views?
Message
De
05/10/2000 11:26:37
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00425145
Message ID:
00425341
Vues:
10
Joe,

I set up all my views in the LOAD of a form - that way, when all the contained objects are instantiated, they have access to that data. If you set it up in the init, you will run into issues where things like grids won't see the data when they are set up, and will therefore be empty.

Sometimes, though, you need to pass a parameter to a form and can't set up your views till the init. In that case, I usually create a grid setup method which manually codes the record source and depending on the grid, the control source for each column.

Regarding actually coding your views, I personally have a series of PRGs which I call SQL_viewname, where the view name represents the view which is coded. This way I can change any view at any time just by modifying that one PRG and running it.

Hope this helps,

David

>Having become dependent on the view designer and the DE to hold them I now face a problem. I have found that
>the view designer cannot handle anything even remotely complex. I will have to program the views
>by hand. No big deal. But where is the best place to set them up assuming I will use them thoughout many
>forms? In the init of the main form?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform