Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What could cause error on this line
Message
De
13/10/2011 07:28:02
 
 
À
13/10/2011 07:06:49
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01526039
Message ID:
01526262
Vues:
45
>>>Changes in table structure. You change the table, you need to recreate the view, set five or six properties for each added/changed field... maybe not as much work, but extremely easy to forget something somewhere and create a new, hard to track, bug.
>>
>>Not really, each view has a function that creates that view
>
>So you have to edit that function (if it's something generated by gendbc, gendbcx or now fox itself) and not forget to run it... maintenance.
>
>>When I change a table that has one or more views on it - I recreate all my views in the order that they were created
>>Reason to recreate all views is that some views are using other views
>
>More maintenance.
>
>I prefer using SPT via cursor adapters. Less maintenance, no code to (re)create the metadata (views are metadata - stored in the dbc), and much more control. You can even hook your own code into various events in your adapters.
>
>I'm still using views on a few smaller projects, and specially on those where the table structure doesn't change much over the years, I'm quite happy. But with anything big enough, views can take more time than they're worth.


> So you have to edit that function (if it's something generated by gendbc, gendbcx or now fox itself) and not forget to run it... maintenance.


I simply edit the function - run it until I'm happy with the view

Maintenance - not really

When I'm happy with the view or any database modifications, I call a function SaveDataBaseContents() which takes care of all that - nothing very difficult - adbObjects(, 'view') returns them in the order they were created

The function that creates a view calls another function that loops through the tables and fields used by the view and sets all the Captions, format, etc of the fields of the view

So if I change/add a field or one of its properties (caption, format, etc) - I call SaveDateBaseContents() and all the views using that field - including it's (parent) views.

The only maintenance is one function to call - not bad

And if you're used to define/modify views coding them - it's very fast
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform