Create a New Data File

You are now going to create a new indexed data file, including the index keys required of an indexed file.

  1. In the File group, click (New File).

    The Create New File dialog box appears.

  2. In the Filename field, enter the path to the DataToolsDemo project folder and append \dataidx.dat.
  3. In the File Details section, select the following:
    Field Setting
    Organization Indexed
    Format 8 - IDXFORMAT8
    Encoding ANSI
    Max Length 10
  4. Click Define Keys.

    The Key Information dialog box appears.

  5. Click (Insert Before).

    A component is created for the primary key.

  6. Click the Component tab.
  7. Select Component 0 for the primary key, then alter the length of the key component to 3.

  8. On the Key tab, click (Insert After).

    Alt Key 1 is created in the Key Structure pane.

  9. On the Component tab, select Component 0 for the alternate key, and set the values to Offset: 3, Length: 10, then click OK.

    Notice how the Max Length field has been increased (from 10) based on the length values of your keys.

  10. Click Create File.

    The empty file is created and displayed in the editor. Next, you can add records to it.