Product Documentation

BTRV Edition User's Guide

Previous Topic

Next Topic

<key> table element

The <key> element specifies the definition of one index present in the data file. A key table element is needed for every index. Use the Btrieve BUTIL -stat command to find out statistics about the original file.

<table>

<key>

</key>

</table>

FairCom RTG COBOL - The <key> element can be defined from the information contained within the COBOL FILE-CONTROL section combined with the specifications of the RECORD definition from the COBOL source. The duplicate attribute will always be false for the RECORD KEY. For the ALTERNATE KEY, the duplicate attribute will be true if the alternate key accepts duplicates (WITH DUPLICATES) otherwise false. The segCount clause is the number of the fields composing every key.

Elements

Element

Description

<part>

Describes one of the fields composing the key. This element must be repeated to define all the fields composing the key.

Optional Attributes

Attribute

Description

duplicate

Indicates whether the index can contain duplicates. Allowed values are "false" if the index cannot contain duplicates, "true" otherwise. The default value is "false"

primary

Indicates whether the index will act as the table SQL primary key. Set this attribute to "true" to use the index as a SQL primary key. Please note that only one primary key is allowed for each table. The default value is "false."

See Also

TOCIndex