Pervasive logo

Prev Advanced Operations Guide Next

Associating a Data File with a Database


To add a Btrieve data file to a Pervasive.SQL database, you must associate the data file with a table definition in the database.


Tip
Moving your Btrieve file to the same directory as the other data files in the database can make database maintenance tasks easier. Do not move the file unless you can re-configure your existing Btrieve applications to be aware of the file's new location.

To create a table definition for a data file

  1. If you do not have Pervasive Control Center (PCC) open, start it now by choosing Start4Programs4Pervasive.SQL V84Control Center.
  2. Double-click Pervasive.SQL Engines to show a list of engines registered with PCC. Next, double-click the icon representing your target engine, to show a list of the databases serviced by that engine.
  3. Right click on the database to which you want to add the Btrieve file. Choose New4Table. This step brings up the Create Table Wizard.

     
    Figure 13-1 Create Table Wizard-Advanced Settings

  1. In the Create Table Wizard, enter the name you want to assign to the new table and click Use advanced settings, as shown in Figure 13-1, Create Table Wizard-Advanced Settings. The table name must be no more than 20 characters. It does not have to correspond to the data file name, although that is a good idea to help you remember which file corresponds to which table definition. Click Next.

     
    Figure 13-2 Create Table Wizard-Specify Btrieve File

  1. In the next window, specify the Btrieve file for which you are creating a table definition. If you don't want to type the path, you may click ... to select the file. See Figure 13-2 Create Table Wizard-Specify Btrieve File. In the example screen, we are creating a table definition for the file person.mkd.
  2. Click Next to display "Columns and Indexes found in the Btrieve file" window, as shown in Figure 13-3.

    Your table name is now associated with the data file, but the table definition is still empty, except for any index definitions that were found. Do not exit the Create Table Wizard. Continue to the next section of this chapter, Building a Table Definition, for detailed instructions on using the remaining screens of the wizard to build a table definition for the specified data file.


Prev
Creating a Database
Contents
Up
Check for Revisions
Next
Building a Table Definition