cancel
Showing results for 
Search instead for 
Did you mean: 

"An error happened while reading data from the provider: 'The type initializer for 'Microsoft.Data.S

Installed PowerBI desktop (x64) (clean install) last week (didn't note the version installed) and played around with local data file sources, all ok. 

Today I attempted to connect to a SQL database on Azure VM and received the following message; 

Details: "An error happened while reading data from the provider: 'The type initializer for 'Microsoft.Data.SqlClient.SNINativeMethodWrapper' threw an exception.'"

Upgraded to the latest version Version: 2.87.923.0 64-bit (November 2020) as a previous post suggested that this may fix the fault.

Retried the connection, same result.

Perused the various documents in C:\Users\#username#\AppData\Local\Microsoft\Power BI Desktop, traces,snapshots,performance traces, can't see anything obvious.  I can't find a stack trace, although I have seen similar reports in Github earlier this year.

Can't find SNI.dll on my machine, do I have to install Microsoft.Data.SqlClient Nuget package?

Status: New
Comments
Community Support

hi  @NickMcNair 

Please refer to this same post:

https://www.reddit.com/r/PowerBI/comments/jwctaa/powerbi_error_the_type_initializer_for/

 

I have found that if you're using the Microsoft Store Power BI Desktop App it's causing those errors. By using the Microsoft manual download one it's not throwing those errors

 

Regards,

Lin