How to form a connection string to enable the "forced protocol encryption" property for using ssl encryption

I am using the Microsoft OLE DB Provider for SQL Server in an MFC application to use a database. I want my connection to use ssl encryption to connect. My code looks like this:

String SQL_connData = "provider=SQLOLEDB;"; SQL_connData += "Encrypt=true;"; SQL_connData += "TrustServerCertificate=true;" 

It does not seem to use the SSL certificate installed on the server. Can someone let me know how to write a connection string in this case?

Thank you very much.

0
source share

Source: https://habr.com/ru/post/1440774/


All Articles