The driver supports inserts into IDENTITY columns in data replication scenarios. This functionality may be useful when publishing data from a previous version of SQL Server.

Either the Enable Replication User (EnableReplicationUser) connection option or the SQL_COPT_REPLICATION_USER connection attribute (numeric value 1080) can be used to allow inserts into IDENTITY columns. When the option or attribute is set to 1 (Enabled), explicit values can be inserted into IDENTITY columns defined as NOT FOR REPLICATION. For inserts to succeed, IDENTITY columns must defined as NOT FOR REPLICATION.

If different values are specified for the Enable Replication User option and the SQL_COPT_REPLICATION_USER attribute, driver behavior is determined by the value of the SQL_COPT_REPLICATION_USER attribute. The SQL_COPT_REPLICATION_USER connection attribute is included in the file qesqlext.h installed with the product.