CDO$HELP.HLB  —  CDO Commands, DEFINE  RECORD Command
    Format

      DEFINE  RECORD  record-name

              [ DESCRIPTION  IS /*text*/ ]   [ AUDIT  IS /*text*/ ]

              [ record-property ] ...

              [ constraint-clause ] ... .

              { included-name-clause  }
              { local-field-clause    }
              { structure-name-clause } ... .
              {                       }
              { variants-clause       }

              END [ record-name ] RECORD  .

1  –  Parameters

1.1  –  record-name

    Specifies the record element you are creating.

1.2  –  text

    Adds information. Within the DESCRIPTION clause, this is
    information documenting the record element; within the AUDIT
    clause, it is a history list entry. Valid delimiters are /* */ or
    double quotation marks (" ").

    You can use Japanese to document comments in the DESCRIPTION or
    AUDIT clause for a field. To do this, use the SET CHARACTER_SET
    command, and set the character_set of the session to DEC_KANJI.

1.3  –  record-property

    Adds a property to the record element. See rec-properties for the
    record properties CDO provides.

1.4  –  constraint-clause

    Specifies a condition that affects adding or modifying data to
    the database table (CDO record). CDO provides syntax for record
    constraints, including specification of NOT NULL, PRIMARY KEY,
    FOREIGN KEY, UNIQUE, and CHECK (arbitrary search condition
    constraint) for fields and records. See the DEFINE
    RECORD_Constraint command for more information.

1.5  –  included-name-clause

    Allows you to include existing field definitions and record
    definitions within record elements. See the DEFINE
    RECORD_Included_Name command for more information.

1.6  –  local-field-clause

    Allows you to create local field definitions within record
    elements. Describes the attributes of the local field. See the
    DEFINE RECORD_Local_Field command for more information.

1.7  –  structure-name-clause

    Creates structure definitions within record elements. See the
    DEFINE RECORD_Structure_Name command for more information.

1.8  –  variants-clause

    Creates variants definitions within record elements. See the
    DEFINE RECORD_Variants command for more information.

2  –  Description

    The DEFINE RECORD command creates a record element.

    If you supply a record name that is already used for a record
    element in your default directory, CDO creates a new version of
    the existing record definition.

    The DEFINE RECORD command evaluates the record name you supply
    to determine if it is a logical name. If the record name is a
    logical name, CDD translates it. In some cases, the translation
    of the logical name for the record may not be a valid name
    for a record definition, and CDO will not create the record
    definition. For example, if you have defined JOE as a logical
    name that translates to MYNODE::[RICHIE], CDD translates the
    symbol JOE. The following DEFINE RECORD command fails because
    MYNODE::[RICHIE] is not a valid name:

    CDO> DEFINE RECORD JOE.
    %CDO-F-ERRDEFINE, error defining object
    -CDD-F-NOTADIC, Does not contain a CDO dictionary:
    MYNODE::

    If this error occurs, deassign the logical name with the same
    name as the object, and perform the operation again. To avoid
    this logical name conflict, use unique names that represent the
    type of entity you are naming.

3  –  Examples

  CDO>  DEFINE RECORD EDUCATION_RECORD.
  cont>   BADGE_NUMBER.
  cont>   BACHELOR_DEGREE.
  cont>   MASTER_DEGREE.
  cont>   DOCTORATE_DEGREE.
  cont> END RECORD.

      In this example, the DEFINE RECORD command creates the
      EDUCATION_RECORD record definition from four existing field
      definitions.
Close Help