COPY STRUCTURE

Create a new database based on current database structure

Syntax

COPY STRUCTURE TO <xcFileName> [FIELDS <field,...>]

Arguments

TO <xcFileName> is the name of the new database file to create. (.dbf) is the default extension if none is given. It can be specified as a literal file name or as a character expression enclosed in parentheses.

FIELDS <field,...> is an optional list of field names to copy from the currently open database in the specified order, the default is all fields. Names could be specified as uppercase or lowercase.

Description

COPY STRUCTURE create a new empty database file with a structure that is based on the currently open database in this work-area.

COPY STRUCTURE can be use to create a sub-set of the currently open database, based on a given field list.

COPY STRUCTURE command is preprocessed into __dbCopyStruct() function during compile time.
Examples
     // Create a new file that contains the same structure
      USE TEST
      COPY STRUCTURE TO MyCopy

      // Create a new file that contains part of the original structure
      USE TEST
      COPY STRUCTURE TO SomePart FIELDS name, address
Status

Ready

Compliance

COPY STRUCTURE works exactly as in CA-Clipper

Platforms

All

See Also