Mike Lewis
Programmer
What's the best way to programmatically rename the tables in a database container?
I thought RENAME TABLE would do the job. But it turns out that it only renames the table objects within the DBC, not the physical files (DBFs, CDX, FPTs).
I've tried using RENAME TABLE to rename the table objects, and then a straight RENAME to rename the physical files. But when I tried to open a table, it said that the backlink had been broken.
I know I can solve that problem by doing a VALIDATE DATABASE and then resolving the backlinks manually. But I want to do this in a PRG which will be run by non-techie users.
Anyone got any ideas about how I can do this?
Thanks in advance.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
My Visual FoxPro site: www.ml-consult.co.uk
I thought RENAME TABLE would do the job. But it turns out that it only renames the table objects within the DBC, not the physical files (DBFs, CDX, FPTs).
I've tried using RENAME TABLE to rename the table objects, and then a straight RENAME to rename the physical files. But when I tried to open a table, it said that the backlink had been broken.
I know I can solve that problem by doing a VALIDATE DATABASE and then resolving the backlinks manually. But I want to do this in a PRG which will be run by non-techie users.
Anyone got any ideas about how I can do this?
Thanks in advance.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
My Visual FoxPro site: www.ml-consult.co.uk