Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing a database's name
Message
De
30/06/1998 20:20:38
 
 
À
30/06/1998 18:54:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00113185
Message ID:
00113192
Vues:
17
>Does anyone know a way to change a database name programmatically? Using the RENAME FILE command doesn't work (the tables inside the container lose their links to the database).
>
>The only way I know how to rename a database is through the Project Manager (select Project menu and then Rename File..); I need my program to be able to this by itself.
>
>Thanks.

Oleg, here's some pseudocode:

Close the database.
Copy the database.
USE Database.DBC
SCAN
If OldDatabaseName $ Field
Change it
Endif
ENDSCAN
USE IN Database
RENAME Database
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform