Try OpenEdge Now
skip to main content
ABL Reference
Handle Attributes and Methods Reference : CREATE-LIKE( ) method
 

CREATE-LIKE( ) method

Creates a table like another existing table, or a dynamic ProDataSet object like another static or dynamic ProDataSet object.
Return type: LOGICAL
Applies to: ProDataSet object handle, Temp-table object handle

Syntax

CREATE-LIKE ( {src-buffer-handle-exp|src-table-name-exp}
  [ , src-index-name-exp] )
CREATE-LIKE ( {src-dataset-handle|src-dataset-name}
  [ , name-prefix] )
src-buffer-handle-exp
An expression that evaluates to a buffer handle from which to copy the field definitions, and optionally, the indexes if src-index-name-exp is not specified.
src-table-name-exp
An expression that evaluates to a table name from which to copy the field definitions and, optionally, the indexes if src-index-name-exp is not specified.
src-index-name-exp
A character expression giving an index to be copied from the source table. If this option is specified, only this single index is copied from the source table.
src-dataset-handle
The handle to the ProDataSet object from which to create the new ProDataSet object.
src-dataset-name
The name of the ProDataSet object from which to create the new ProDataSet object.
name-prefix
A character expression to prepend to each of the source ProDataSet member buffer names, which creates a new name for each new member buffer.
For a table handle, this method copies the field definitions from the specified source table and establishes the default or specified source indexes. You cannot call this method after another definitional method is called unless you call CLEAR( ) first.
For a ProDataSet object handle, this method creates a dynamic ProDataSet object like another static or dynamic ProDataSet object. The AVM creates the new ProDataSet object with the same name, temp-table definitions, and relation definitions. The AVM also creates the same before-image and after-image tables, if any exist for the source object. No data from the source temp-tables is copied. The AVM also lets you rename the newly created ProDataSet member buffers by prepending a prefix to the source buffer names.

See also

CREATE-LIKE-SEQUENTIAL( ) method