Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing a database's name
Message
From
30/06/1998 20:20:38
 
 
To
30/06/1998 18:54:49
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00113185
Message ID:
00113192
Views:
20
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform