次の方法で共有


How to: Update Table and Database Links

When you move database (.dbc, .dct, and .dcx) files or a database table, the relative paths change and might break forward links and back links that Visual FoxPro uses to associate database and table files. You can reestablish links and update the relative path information to reflect the new file location.

Tip

If you want to open a table without reestablishing links for all tables in the database, use the USE command. Visual FoxPro displays the Open dialog box so you can locate the database that owns the table or delete the links. For more information, see USE Command.

You can also remove the database reference, or back link, from a table.

  • Use the VALIDATE DATABASE command with the RECOVER clause

For more information, see VALIDATE DATABASE Command.

For example, the following code opens a database named MyDatabase and displays dialog boxes to help you locate those tables that are not in the locations stored by the database:

OPEN DATABASE MyDatabase
VALIDATE DATABASE RECOVER
  • Use the FREE TABLE command.

    Warning

    Do not use FREE TABLE to remove a table from a database if the database exists on disk; use REMOVE TABLE instead. If the database exists on disk, FREE TABLE might render the database unusable.

For more information, see FREE TABLE Command.

See Also

Tasks

How to: Remove a Table from a Database

Reference

Databases in Visual FoxPro

Other Resources

Creating Databases

Working with Items in Databases