Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replacing table in a database question
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Replacing table in a database question
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01055820
Message ID:
01055820
Vues:
52
I am building a routine to get rid of table MEMO corruption.
The routine copies all "good" records to a new table. The new table is created with the same structure as the original table, as the following:
USE ORIG_FILE in 0
afields( aDbfStruct )
create TABLE TEMP_COPY from array aDbfStruct
Once the program copies all records, I need to rename the TEMP_COPY to ORIG_FILE. Would the following sequence be a correct:
1. Drop ORIG_FILE from the database
2. Erase ORIG_FILE
3. Rename TEMP_COPY to ORIG_FILE
4. Add new ORIG_FILE to the database

Or is there a more efficient and better method to accomplish this?

Thank you in advance for any suggestions.
"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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform