Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tip of the Day --- Views (Part Two)
Message
De
29/09/1999 00:46:47
 
 
À
28/09/1999 14:35:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00269786
Message ID:
00270351
Vues:
23
OK, so what's better (or at least how do they compare)... GenDbcX vs eView?

-Bonnie

>John and Steven,
>
>Erik Moore's eView utility works really well also and specificly designed
>for views. It also gives you all the options that a remote view has for local
>views.
>
>Thanks Erik :)
>
>>>A common problem with views is that the View Designer can't handle complex views and, sometimes, we want to set some defaults for the view through DBSETPROP or CURSORSETPROP that we want to remain persistant, that is, always in effect unless otherwise overridden.
>>>
>>>So, what to do? Well, there's a neat tool that generates code that can reconstruct a database. It's called GENDBC and resides in \VFP98\TOOLS\GENDBC. Running GENDBC producers a PRG that can rebuild the DBC. This is step one.
>>>
>>>Step two is to take the PRG that GENDBC created and strip out everything that's not a view. This leaves nothing but view definition code. Now, go into that code and modified the DBSETPROPs functions as desired. Make sure that you have the command OPEN DATABASE myDBC EXCLUSIVE as the first line and CLOSE DATA as the last line of the PRG.
>>>
>>>Now save the PRG in the directory where your data resides. Call it GenViews. Easy enough.
>>>
>>>Now, everytime that circumstances call for a change to a view or you want to experiment with a view setting or structure, just modify GenViews as appropriate and rerun it. That's it!
>>>
>>>Works everytime and it's a big time saver, not to mention a great debugging tool for those problem views.
>>
>>John,
>>Good tip. However, I reccomend using GenDbcX instead of GenDbc. GenDbc has problems with complicated databases and creates a prg that's too large to compile. GenDbcX breaks down the code to recreate the DB into seperate methods.
>>You can call individual methods to recreate any individual table, view, etc. It also has a CreateViews method that will recreate all views. You don't have to go to the trouble of striping that code out of the GenDbc output. You just instantiate the class created by GenDbcX and call the CreateViews method.
>>
>>GenDbcX is available on Steve Arnott's website http://www.stevearnott.com/
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform