次の方法で共有


ServerBCPKeepIdentity Property

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。新規の開発作業ではこの機能を使用しないようにし、現在この機能を使用しているアプリケーションは修正することを検討してください。

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]

Parts

  • object
    An expression that evaluates to an object in the Applies To list
  • value
    TRUE or FALSE

Data Type

Boolean

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetServerBCPKeepIdentity(LPBOOL pRetVal);
HRESULT SetServerBCPKeepIdentity(BOOL NewValue);

解説

If TRUE, SQL Distributed Management Objects (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.

If FALSE, SQL-DMO ignores any data values present for a column with the identity property. Microsoft SQL Server generates data values for the column using the column's setting for identity seed and increment. The default is FALSE.

The ServerBCPKeepIdentity property is interpreted only when data is imported and if the UseServerSideBCP property of the BulkCopy object is TRUE.

Applies To:

BulkCopy Object