The ServerBCPKeepIdentity property controls the handling of existing values for a column with the identity property when importing data into the column.
object.ServerBCPKeepIdentity [= value]
Part | Description |
---|---|
object | Expression that evaluates to an object in the Applies To list |
value | True or False |
When True, SQL-DMO executes a SET IDENTITY_INSERT ON statement when the ImportData method of a Table object is called. Values for the identity column existing in the data file are copied to the referenced table’s identity column.
When False, SQL-DMO ignores any data values present for a column with the identity property. Microsoft® SQL Server™ generates data values for the column by using the column’s setting for identity seed and increment. The default is False.
The ServerBCPKeepIdentity property is interpreted only when importing data and when the UseServerSideBCP property of the BulkCopy object is True.
Boolean
Read/write
HRESULT GetServerBCPKeepIdentity(LPBOOL pRetVal);
HRESULT SetServerBCPKeepIdentity(BOOL NewValue);