COPY STRUCTURE

 

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

Compliance

Clipper

Platforms

All

Seealso

COPY STRUCTURE EXTENDED, DBCREATE(), DBSTRUCT(), __dbCopyStruct(), __dbCopyXStruct(), __dbCreate(), __dbStructFilter()

2 responses to “COPY STRUCTURE

  1. Pingback: Harbour Commands | Viva Clipper !

  2. Pingback: Harbour RG Summary | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.