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. Click GUID-6B939487-68A6-434A-AA58-5DC89A5397F9-low.png (New File).
  2. Select Data File, then click OK.

    The Create New File dialog box appears.

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

    The Key Information dialog box appears.

  6. Click GUID-E3D794B4-4B83-435C-9C22-7E93E9CCF042-low.png (Insert Before).

    A component is created for the primary key.

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

    GUID-D6DF823D-6213-485E-93B2-A2C2F25380CE-low.png

  9. On the Key tab, click GUID-AF5B3CAC-8C5F-4E1B-BA3A-9D26E1C1C650-low.png (Insert After).

    Alt Key 1 is created in the Key Structure pane.

  10. 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.

  11. Click Create File.

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