SDAC

TMSConnectionOptions.MSOLEDBEncryptType Property

Specifies "Optional", "Manadatory", and "Strict" values for Encrypt Connection to the SQL Server.

Class

TMSConnectionOptions

Syntax

property MSOLEDBEncryptType: TMSOLEDBEncryptType;

Remarks

The MSOLEDBEncryptType property is of the TMSOLEDBEncryptType type. It supports encryption values that correspond to the SQL Server native "Optional", "Mandatory", and "Strict" settings.

MSOLEDBEncryptType is used only with the OLE DB Driver 19 for SQL Server and works in conjunction with the Encrypt option.

Use the following combinations of MSOLEDBEncryptType and Encrypt to configure encryption correctly:

  1. Encrypt = True and MSOLEDBEncryptType = etMandatory / etStrict
  2. Encrypt = False and MSOLEDBEncryptType = etOptional

Example

Example of using "MSOLEDBEncryptType = etStrict" with SQL Server's Force Strict Encryption enabled:

...
uses
  ..., MSClasses;
...
  MSConnection1.Options.Provider := prMSOLEDB;
  MSConnection1.Options.MSOLEDBVersion := ole19;
  MSConnection1.Options.Encrypt := True;
  MSConnection1.Options.MSOLEDBEncryptType := etStrict;
... 

See Also

© 1997-2025 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback