Hi Team,
Uninstalled the older version of "Microsoft® OLE DB Driver 18 for SQL Server®" and installed the latest "OLE DB Driver 19.0 for SQL Server". Testing the connection using OLE DB Driver 19 driver then getting the following connection error:
OLE DB Driver 19 for SQL Server Data Link Error
[Microsoft OLE DB Driver 19 for SQL Server]: Client unable to establish connection
[Microsoft OLE DB Driver 19 for SQL Server]: SSL Provider: The certificate chain was issued by an authority that is not trusted.
Looks like opening a connection got failed. When it calls Open() method then it throws the above error.
My Code Snippet:
string connStr = string.Empty;
if (rbUseMSOLEDB.Checked)
connStr = "provider=MSOLEDBSQL19;";
else
connStr = "provider=SQLOLEDB;";
connStr += "Data Source=" + txtServer.Text + "; Initial Catalog=" + txtDBName.Text + "; User Id=" + txtUserName.Text + "; Password=" + txtPassword.Text + ";";
using (OleDbConnection con = new OleDbConnection(connStr))
{
con.Open();
con.Close();
}
Please help me to find out the root cause of this error.
My Configuration Details as below:
SQL Server Management Studio 15.0.18338.0
SQL Server Management Objects (SMO) 16.100.41011.9
Microsoft Analysis Services Client Tools 15.0.19205.0
Microsoft Data Access Components (MDAC) 10.0.19041.1
Microsoft MSXML 3.0 6.0
Microsoft .NET Framework 4.0.30319.42000
Operating System 10.0.19044
Note: With older version of Microsoft® OLE DB Driver 18 for SQL Server®" (18.6.3.0) connection is working using SQLOLEDB provider.
Regards,
Suresh Kaushik