I would like to connect to SQL Server TLS 1.2 via delphi XE7 application. How would be make the connection string ? It is possible ?
Within the application connection string, you just need to add the following parameters; Encrypt=True
and TrustServerCertificate=False
and that's it!
Of course your server must be configured to use TLS 1.2. And the client library you use must be TLS enabled.
-
-
-
what do you mean "And the client library you use must be TLS enabled " i just make new connection string with SQLNCLI11.1 and Encrypt=True and TrustServerCertificate=False and it works. I use TAdoconnection – B.Geronatsios Nov 28 '20 at 15:26
-
That means you have the correct client library (ADO connection is using a client library). So don't worry. – fpiette Nov 28 '20 at 15:48
I play with Provider=SQLNCLI11.1 and not SQLOLEDB.1 . I made Encrypt=True and TrustServerCertificate=False and it works fine.
According to microsoft Native SQL and SQLOLEDB is depricated and for a new development is OLEDB Driver : OLEDB Driver Microsoft
I just replace provider with MSOLEDBSQL.1 and works