Hi,

When I am trying to get data from SQL (SCCM 2012 server), but I'm getting error:
Run-Time Error '-2147217900 (80040e14)': The Certificate, asymmetric key, or private key data is invalid.

Set cn = New ADODB.Connection
cn.CommandTimeout = 0
cn.Open "Provider = SQLOLEDB.1; server=(Server Address); Database=(db name); Trusted_Connection=yes"
sSql = "Select * FROM DB"
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient 'who manages the cursor ADO (adUSEclient) or Server (adUseServer)
rs.Open sSql, cn '// ERROR Apears on this line.

Sometimes it passes though this line, sometimes it stops and If i press debug and run again it passes.

Maybe you know where issue could be?