Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table exclusive in dataenvironment
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00546926
Message ID:
00547257
Vues:
10
>>Is it better for me to build a function or a class for endeling the table and call this function in the form.load of my form that way I will have full control on it
>>When I was codding in clipper I used a function to do so.
>>
>
>It depends on your ultimate goal here. If anything, I would use a class for this. There is nothing wrong in using a function but if you want a flexible solution, the class is the best way (IMO) to go.
>
>What kind of class you use is another matter. If you want something that can dragged around and used anywhere, then I would create a separate class. If you know you are only ever going to use this functionality in your forms, then you could add this code to the Load event of your form baseclasses.
>
>If you go the separate class route, you have two options there. Either use AddObject to add the data object to the form so it participates in the form's datasession or create a private variable very high up in your program stack (i.e. Main program) and pass it the datasession of the form in question when you call its methods. The object will have to switch datasessions to the form's and then switch back when done.
>
>My personal preference (and recommendation) is to use a separate class and use AddObject but that's just me.
>
>HTH.
Thanks Larry
What do you think about the solution of M.Sombreffe ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform