Syntax
CREATE-LIKE ( { src-buffer-handle-exp | src-table-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. This can be a buffer for either a
temp-table or database.
- src-table-handle-exp
- An expression that evaluates to a temp-table 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 the name of a temp-table or database
table 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.
Note: For a ProDataSet object handle, if you call CLEAR() or
CREATE-LIKE() more than once on a dataset, the dynamic temp-tables from
the prior call(s) are not deleted automatically and have the potential to cause a memory
leak. Therefore the application is responsible for deleting the temp-tables if
CLEAR() or CREATE-LIKE() are called again.