How to Handle Path Issues When Moving Databases

Last reviewed: March 6, 1996
Article ID: Q147941
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 3.0

SUMMARY

When you move an application from one computer to another, and that application uses shared data on a network server, you may experiences problems with the paths. Programmers write their code so that paths are as generic as possible but when the application is moved and the paths are therefore different, it becomes a tremendous inconvenience to re-code the differences in the path information and redistribute the application.

This article explains and demonstrates how to avoid these path-related problems in relation to databases and the database container (DBC).

MORE INFORMATION

A Visual FoxPro database container (.dbc file) stores a relative path to the tables it contains. Therefore, if you move a .dbc file and its .dbf files to a new location, there shouldn't be any problems as long as the relative paths remain the same.

For example, you could move the following files from here:

   \prod\data\foo.dbc
   \prod\data\tables\bar.dbf
   \prod\data\tables\baz.dbf

to here:

   \dev\data\foo.dbc
   \dev\data\tables\bar.dbf
   \dev\data\tables\baz.dbf

without any trouble.

Additionally, if you want to use drive letters to network drives, you can map a new network drive and path to the same drive letter like this:

 net use q: \\prod\data

     or

 net use q: \\dev\data


Additional reference words: 3.00 VFoxWin
KBCategory: kbusage kbhowto
KBSubcategory: FxotherGeneral


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 6, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.