Thanks Jayesh Patel, (
jbpatel@hotmail.com) who provide a tools in File section which can rename database!
But I wonder that the tool cannot work if there is a view in database!
Then, I tried to Open mydatab.dbc, Locate for ObjectType = "View",
and edit the Memo field to Replace all database name to new database name.
In first time, it still fail to work, but... when I tried to replace the new database name with same length to old database name, it works!!
That is, if you want to rename database, use Jayesh's rendbc.app and then do:
Procedure FixRenDbc
Lparameters OldDataBName, NewDataBName
LenOldDataB = Len(OldDataBName)
LenNewDataB = Len(NewDataBName)
If LenNewDataB > LenOldDataB
Messagebox("Sorry, please find a newname with Length is equal or less than OldDatabase Name!", 16, "~_~")
Endif
open newdatab.dbc
locate for ObjectType = "View"
Do While found()
Replace Property with StrTran(Property, OldDataBName, ;
Space(LenOldDataB-LenNewDataB)+NewDataBName)
Continue
enddo
use
Although this, if any one database name in view property memo is shorter, it will make the whole database cannot be opened!!
There may be a check on VFP when opening database on even total memo length of view is straightly checked!!
Anyway, it is just a reference only, I will also send this message toJayesh Patel for enhancement! ^-^;
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.