PRB: Field Mapping Lost When Project Moved to Different Drive (173878)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 5.0a
This article was previously published under Q173878 SYMPTOMS
Moving a project that contains tables to a different drive clears the "Map
field type to classes" information for the tables.
RESOLUTION
To workaround the problem place the following code in a Visual Foxpro
program file:
Sample Code
PARAMETERS lcDBC, lcFromDrive, lcToDrive
&&lcDBC = Database Container in the project.
&&lcFromDrive = The drive where the project was originally.
&&lcToDrive = The drive where the project is moved to.
if ( pcount() = 1 )
if ( lower( getenv( "Machine" ) ) == "dfsd pentium" )
lcFromDrive = "e" &&Drive where project originally located.
lcToDrive = "h" &&Drive where project is moved to.
else
lcFromDrive = "h" &&Drive where project originally located.
lcToDrive = "e" &&Drive where project is moved to.
endif
endif
lcFromDrive = lower( lcFromDrive ) + ":\"
lcToDrive = lower( lcToDrive ) + ":\"
use (lcDBC + ".dbc")
scan for objecttype = "Field"
if ( at( lcFromDrive, Property ) > 0 )
replace property with strtran( property, lcFromDrive, lcToDrive )
endif
endscan
use
Save the file, in the project directory (VFPApp), as movedbc.prg.
After you move the Project directory, for example from C:\VFPApp to
D:\VFPApp, run Visual FoxPro and type the following commands in the command
window:
SET DEFAULT TO d:\VFPApp
movedbc("qa","c","d")
Now when you open the project and then modify the table, you will not get
the error message, and the Field mapping information will be retained.
STATUS
Microsoft is researching this problem and will post new information here in
the Microsoft Knowledge Base as it becomes available.
Modification Type: | Major | Last Reviewed: | 12/11/1999 |
---|
Keywords: | kbprb KB173878 kbAudDeveloper |
---|
|