Establish DB connection by using Microsoft OLE DB provider and SQL Native OLE DB provider

前端 未结 1 2004
孤街浪徒
孤街浪徒 2021-01-22 10:51

I have created a sample app by using both the oledb provider(SQLOLEDB and SQL Native OLEDB provider).

Case 1 : Provider = SQLOLEDB

hr = ::CoInitializeEx(         


        
相关标签:
1条回答
  • 2021-01-22 11:12

    Replace the connection string with

    CString SSlcon_string = "provider=SQLOLEDB;Use Encryption for Data=True;server=MYPC;Database=MyDB"; 
    

    The remaining steps will be same.Install the same certificate(present on server) on client machine's "truted root certificate authorities" folder.

    If server and client both will have same certificate then connection will be established(SSL Connection) otherwise fail.

    0 讨论(0)
提交回复
热议问题