Forum Discussion

patrickhofman's avatar
patrickhofman
New Member
9 years ago
Solved

DataSource.Error when connecting to ADO.NET provider

I have been working on an own implementation of ADO.NET. It works quite well from Visual Studio, etc. but now I want to use it in Power BI Desktop.

 

I have registered the provider in the machine.config already (both platforms) and have copied all relevant assemblies into the GAC. Now I was finally able to go around the first few error messages Power BI gave me, but now I am stuck at this one:

 

DataSource.Error: An error happened while reading data from the provider: 'Value cannot be null.
Parameter name: values'
Details:
DataSourceKind=AdoDotNet
DataSourcePath=MyOwnProvider/param1=Something

 

Now it seems to me this is a standard .NET error message, so that would be easy to solve if I know where it went wrong. Unfortunately I have found no way to diagnose the issue yet. I have tried using Visual Studio to debug Power BI (which seems to have successfully loaded my assembly). I have tried to use DebugView and ProcMon to see what happens, but all failed to give me anything useful.

 

How to diagnose what actually went wrong? How to get a detailed log, call stack, or whatever?

  • Anonymous's avatar
    Anonymous
    9 years ago

    Hi patrickhofman,

    Based on your description, you specify ADO.NET provider as data source in Power BI Desktop, right? If that is the case, could you please post a screenshot about that how you connect to the ADO.NET data source from Power BI Desktop?  In this official article, I haven’t found that  ADO.NET provider is included in the supported data source list.

    In addition, you can go to File -> Options and settings -> Options -> Diagnostics and click "enable tracing", then connect to your data source and check the detailed logs in the traces folder.

    Thanks,
    Lydia Zhang

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi patrickhofman,

    Based on your description, you specify ADO.NET provider as data source in Power BI Desktop, right? If that is the case, could you please post a screenshot about that how you connect to the ADO.NET data source from Power BI Desktop?  In this official article, I haven’t found that  ADO.NET provider is included in the supported data source list.

    In addition, you can go to File -> Options and settings -> Options -> Diagnostics and click "enable tracing", then connect to your data source and check the detailed logs in the traces folder.

    Thanks,
    Lydia Zhang

    • patrickhofman's avatar
      patrickhofman
      New Member

      Thanks @Lydia, that was very helpful. I have got things working now, so thanks a lot for your help.

       

      I have put some personal side marks to the answer I gave on the Stack Overflow question I have asked regarding the same issue. You can find it here.

    • dpombal's avatar
      dpombal
      Post Partisan

      How can I specify a adodb connection from Microsoft PowerBI --?

       

      import adodbapi,

      I am using python library to connect to  a datasource like this
      "Provider=PIOLEDB;Data Source=serverIP;Persist Security Info=False;Integrated Security=SSPI"

      adodbapi 2.6.0.7
      A pure Python package implementing PEP 249 DB-API using Microsoft ADO.

       

       

      I see there is a M powerquery function to connect

       

      AdoDotNet.Query(providerName as text, connectionString as any, query as text, optional options as nullable record) as table