Hi, I am having trouble getting the new MSOLEDBSQL19 driver (v19.2.0.0) to work with PowerBuilder2022 build 1892.
I generated a self-signed certificate for SQL Server 2019 using the PowerShell script provided at the bottom of this page: https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-sql-server-encryption?view=sql-server-ver15
In SQL Server Configuration Manager, I forced the ForceEncryption option to TRUE, and selected my self-signed certificate. And after that, I restarted the SQL service successfully.
Then I exported the certificate and installed it on my computer.
When I try to set up the database in PowerBuilder, I get the following error message:
(SSL Provider: The target principal name is incorrect)
I don't understand what I missed or what more needs to be done.
Here is the database connection syntax:
// Profile MyDataBase
SQLCA.DBMS = "MSOLEDBSQL SQL Server
SQLCA.ServerName = "MYSERVER\SQL2019"
SQLCA.AutoCommit = False
SQLCA.DBParm = "TrustedConnection=1,Database='MyDataBase',Encrypt=1,TrustServerCertificate=1,Provider='MSOLEDBSQL19'"
If I use the old MSOLEDBSQL driver (v18.6.4.0) it works.