Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Removing View from VFP database
Message
 
 
À
12/08/2016 04:16:34
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01639398
Message ID:
01639419
Vues:
49
>>Hi,
>>
>>I used to use VFP View in my VFP application. And I still have them in the database. When I open SDT I see in the View tree a bunch of views. Some time ago I switched my application to using CursorAdapter. So I don't think these views are used at all. But one never knows.
>>I have used the same names as names for the CA. For example, I see a view V_Customers but I also use this name as name for a CA cursor. So using GoFish to search for the name brings a lot of results. I seem to remember that to use a VFP Views they have to be opened as a table; with USE command.
>>Therefore, would it make sense to GoFish for "use v_customers" to find if the view is still used somewhere? (before removing it)
>
>Yes but you can't be sure it will be complete. Depending on the coding style, there may be a function used to open aliases which would have the view name as parameter - in that case, you'd have to search for calls to that function as well. Also, the view name may be enclosed in quotes (and we have three kinds of those).
>
>It may be simpler to just make sure the dbc with the views is invisible (move it to a different folder) and check that everything still works without it. I know it's dangerously close to the dreaded practice called testing, but how else can you be sure?

You are right. My style of coding has changed many times, over the course of many years. As far as testing, as much as I hate to admit it, I have been doing more testing of my app than ever before. But the app is so huge (as you can imaging the vertical market applications grow over many years) that testing is very time consuming. Or I can simply leave these views in the DB; I don't think they take any "space" or "memory.". I am just trying to clean up the code. Just in case, someone else (very doubtful) will take over supporting this app.
Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform