none
Error - Connect to a PostgreSQL database (Power Query) RRS feed

  • Question

  • Hello everybody,

    I just started using Power Query, but this failed.

    I followed this guide: https://support.office.com/en-in/article/Connect-to-a-PostgreSQL-database-Power-Query-bf941e52-066f-4911-a41f-2493c39e69e4?ui=en-US&rs=en-IN&ad=IN

    1. Download NPQSql 2.0.12 driver for MS.Net 2.0: http://pgfoundry.org/frs/download.php/3353/Npgsql2.0.12.0-bin-ms.net2.0.zip

    2. Install Microsoft Windows SDK: https://www.microsoft.com/en-us/download/details.aspx?id=18950

    3. Run (Window + R): "C:\Program Files\Microsoft SDKs\Windows\v7.0\bin\GACUtil" /i "C:\Users\LEAD\Downloads\Compressed\Npgsql2.0.12.0-bin-ms.net2.0\Npgsql.dll""C:\Program Files\Microsoft SDKs\Windows\v7.0\bin\GACUtil" /i "C:\Users\LEAD\Downloads\Compressed\Npgsql2.0.12.0-bin-ms.net2.0\Mono.Security.dll

    4. Add a new entry into machine.config:

     <add description=".Net Framework Data Provider for Postgresql Server" type="Npgsql.NpgsqlFactory, Npgsql, Version=2.0.12.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" name="Npgsql Data Provider" invariant="Npgsql" support="FF"/>


    But still error:

    DataSource.Error: PostgreSQL: Unable to find a database provider with invariant name 'Npgsql'.
    This error may have been the result of provider-specific client software being required but missing on this computer.  To download client software for this provider, visit the following site and choose the 32-bit (x86) version of, at minimum, 'Npgsql version 2.0.12': https://go.microsoft.com/fwlink/?LinkID=282716

    Can you help me?Thank all,

    Thursday, April 16, 2015 7:51 AM

Answers

  • Which machine.config did you edit? If you have .NET 4.0 or 4.5 installed, Power Query will run under that version of the CLR and you'd need to edit C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config instead of C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\machine.config.

    I thought that support article had been updated to reflect this :(.

    Thursday, April 16, 2015 10:10 AM

All replies

  • Which machine.config did you edit? If you have .NET 4.0 or 4.5 installed, Power Query will run under that version of the CLR and you'd need to edit C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config instead of C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\machine.config.

    I thought that support article had been updated to reflect this :(.

    Thursday, April 16, 2015 10:10 AM
  • Thank you very much.

    I have configured on .NET 4.0 and success.

    Friday, April 17, 2015 9:39 AM
  • Just following up on this question. When I go to the V4.0.30319-->Config and machine.config I only see <DbProviderFactories/>. Where should I add the new line?
    Tuesday, May 5, 2015 6:57 PM