CopyData Property (SQL-DMO)

The CopyData property controls data transfer from a source to a target database.

Applies To

Transfer Object

Syntax

object.CopyData [= value]

Part Description
object Expression that evaluates to an object in the Applies To list
value Long integer specifying data handling as described in Settings

Settings
Constant Value Description
SQLDMOCopyData_Append 2 Copy data. Data copied will be appended to existing tables.
SQLDMOCopyData_False 0 Do not copy data. Copy schema only.
SQLDMOCopyData_Replace 1 Copy data. Existing data will be replaced by data copied.

Remarks

When CopyData is SQLDMOCopyData_Replace, and the DropDestObjectsFirst property is False, data is removed from existing tables on the target database using a nonlogged operation. For more information, see TRUNCATE TABLE.

Data Type

Long, enumerated

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetCopyData(
SQLDMO_COPYDATA_TYPE* pRetVal);

HRESULT SetCopyData(
SQLDMO_COPYDATA_TYPE NewValue);

See Also

DropDestObjectsFirst Property

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.