Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding a View to the DE on the fly
Message
 
À
30/09/2000 09:20:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00421941
Message ID:
00423135
Vues:
23
>Ko,
>
>Thanks for the reply. I guess from your reply that I didn't explain my question well. I don't have any difficulties creating view code or changeing the view in the interactive environment while I am programming. What I am searching for is a way to check and change the DBC when I e-mail a newer version of a program to someone and there DBC may not have the view defined yet.


A way to check i don't know altough you can try to store a date last updated somewhere.
Or you can try John Koziols idea for that.
But i don't know if i really understanded your question.
The code i gave you simply creates a view and stores that in the DBC. If you try it with a simple view and after that look at your dbc's window you will see that it is added.
If you issue the code twice, or issue the code with another view definition later on then the old definition will be simply overwritten.
I have this code somewhere in my main app and every time my app is updated i run that code.
In your case where it looks like you are simply overwriting the exe you can use a file with a version number or somthing like that. And if the version number in the file differs from the version number of you exe then run the view creation code.


>I searched chapter 8 but I didn't find any thing there relating to my problem. I don't typically don't send out new install disks for and upgrade but just send a new .exe. Maybe that is where I am missing the boat...


I don't send install disks too.
I have a copy of my app retaining on the server (in a update dir)
I also have a version locally for the user to run.
The user don't actually run the main program, but a simple starter program.
That starter exe file looks at the update dir on the server if there is a newer version of my program. And if so it copys it to the clients computer.
after that it starts my main program.

I also have a datadictionairy.
In that dictionairy the whole structure of my tables are stored.
That datadictionairy will be send with the update and also be placed in the server update dir.

In my main program i check the date of the servers datadict and the clients datadict.
If they differ i loop trough them looking at the last updated fields in there, and update the structures where needed.
Also if the date differs i call a setviews method which creates or overwrites my views.

I hope that you are helped with this information,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform