6.9.4.3 IdentityUpdate

When updating DataSet data into the database, this property indicates whether to replace the database's identity column values with values of the DataSet or leave the current values unchanged.

Declaration

// C#
public bool IdentityUpdate {get; set;}

Property Value

When set to true, ODP.NET updates the database identity column values with the values of the DataSet. When set to false, the database identity columns are left unchanged.

Remarks

This property applies only to identity columns of type GENERATED BY DEFAULT and GENERATED BY DEFAULT ON NULL. In the case of type GENERATED ALWAYS, this property will be ignored and the database will always retain its current identity values.

When set to false, the existing identity column value in the server is returned to the DataSet.

When this property is set to true for the GENERATED BY DEFAULT and GENERATED BY DEFAULT ON NULL cases and the application attempts to update the database's identity column with a NULL value, the NOT NULL constraint is violated and an error occurs. ODP.NET then does not update the identity column value and instead returns the existing identity column value of the database to the DataSet.

The default value for this property is false.