SqlCommandColumnEncryptionSetting Enumeration

.NET Framework (current version)
 

Specifies how data will be sent and received when reading and writing encrypted columns. Depending on your specific query, performance impact may be reduced by bypassing the Always Encrypted driver’s processing when non-encrypted columns are being used. Note that these settings cannot be used to bypass encryption and gain access to plaintext data. For details, see Always Encrypted (Database Engine)

Namespace:   System.Data.SqlClient
Assembly:  System.Data (in System.Data.dll)

public enum class SqlCommandColumnEncryptionSetting

Member nameDescription
Disabled

Disables Always Encrypted for the query.

Enabled

Enables Always Encrypted for the query.

ResultSetOnly

Specifies that only the results of the command should be processed by the Always Encrypted routine in the driver. Use this value when the command has no parameters that require encryption.

UseConnectionSetting

Specifies that the command should default to the Always Encrypted setting in the connection string.

  • If Always Encrypted is disabled for a query and the query has parameters that need to be encrypted (parameters that correspond to encrypted columns), the query will fail.

  • If Always Encrypted is disabled for a query and the query returns results from encrypted columns, the query will return encrypted values. The encrypted values will have the varbinary datatype.

.NET Framework
Available since 4.6
Return to top
Show: