Share via


Extending Database Files

Each .dbc file contains a Memo field named User that you can use to store your own information about each record in the database. You can also extend a .dbc file to add fields to accommodate your own needs as a developer. Fields must be added to the end of the structure. You must have exclusive access to a .dbc file to modify its structure.

To add a field to a .dbc file

  1. Open the .dbc file for exclusive use with the USE command.
  2. Use the MODIFY STRUCTURE command.

For example, the following code opens the Table Designer so you can add a field to the structure of Testdata.dbc:

USE TESTDATA.DBC EXCLUSIVE
MODIFY STRUCTURE

When you add a new field to a database file, begin the field name with "U" to designate it as a user-defined field. This designation prevents your field from conflicting with any future extensions to the .dbc file.

Caution   Don't change any existing Visual FoxPro- defined fields in a .dbc file. Any changes you make to a .dbc file could affect the integrity of your database.

See Also

Viewing and Modifying Database Architecture | Validating a Database | Managing a Database | Creating Databases | Referencing Multiple Databases | Working with a Database