You can translate the question and the replies:

ErrorMessage while open connection to Denodo via npgsql in c#

Hi, I am trying to connect to Denodo (Version 7), via c# code. I installed npqsql (version 4.0.6) and created a connection string with: {host} {port} {username} {passwd} {database} and the SSL-Mode as required. (user and pwd combination was checked via Launch Pad) For trying I use a simple select statement. If I call Open() on my NpqsqlConnection object I get the error message {"Received unexpected backend message ParseComplete. Please file a bug."} For beeing sure I tried to ping the host, which works fine. And if I try without SSl, the error message indicates that the SSl is required, therefor I think the correct backend is found. Could someone give me a hint? Thanks
08-05-2019 02:32:19 -0400

5 Answers

Hi, On looking at the error message “Received unexpected backend message ParseComplete. Please file a bug”, it seems to be related with npgsql. In this scenario, I would check the vdp.log file located at “<DENODO_HOME>\logs\vdp" folder to know more about the error. Apart from this, I would try to connect to Virtual DataPort from C# using Entity Framework, which can be found under *<DENODOHOME>\samples\vdp\vdp-clients-EntityFramework* folder. Ensure to use the Npgsql Driver which is compatible with PostgreSQL ADO.NET driver to connect Entity Framework with Denodo. For more information, I would suggest you to refer to the **README** file present in the EntityFramework directory. Also, you can take a look at [Access Through an ADO.NET Data Provider]( section under the Virtual DataPort Developer Guide for more details. Hope this helps!
Denodo Team
08-05-2019 05:54:30 -0400
Hello, thanks for your answer, but I am still not able to connect to Denodo DB via C#. I tried it with the example. Installed the given Npqsql package ( <package id="EntityFramework" version="6.0.0" targetFramework="net40-client" /> <package id="Npgsql" version="2.2.7" targetFramework="net40-client" /> <package id="Npgsql.EntityFramework" version="2.2.7" targetFramework="net40-client" />). Adapt the <connectionStrings> in the App.config ( <connectionStrings> <add name="SampleContext" connectionString="Server=***;Port=9996;Database=****;User Id=****;Password=***;SSL =true;" providerName="Npgsql" /> </connectionStrings>) I need the SSL-connection. If I do not use it, I got an exception, that I need SSL -> so I think the Denodo database is found. When I start the program I got the following exception "+ InnerException {"ERROR: : authentication error: Database 'template1' not found"} System.Exception {Npgsql.NpgsqlException}" In the whole project I never use template1 and it seems that the connection is not established, as the same error message is given if I use a wrong password. Could you help here? Thanks Jessica
13-05-2019 02:32:20 -0400
Hi, The error **“ERROR: : authentication error: Database ‘template1’ not found”} System.Exception {Npgsql.NpgsqlException}”** usually occurs when the specified database is not present in the Virtual DataPort. Hence, I would create a database in Virtual DataPort ('template1' in your case) to overcome this error. I would also give necessary privileges (for eg: Connect) over the database to the user accessing from Entity Framework. Also, I would ensure that the connection string consists of a valid server name and port number of the Virtual DataPort Server. For more details, you can refer to [Creating Databases]( section and [Configuring and Deleting Databases]( section under the Virtual DataPort Administration Guide. Hope this helps!
Denodo Team
20-05-2019 02:22:15 -0400
Hi, sorry, that does not help at all. The database is not given in the code. So it would not be parametrise at all (and I would need to create a seperat e data schema for C# - connection). I will stopp to try this, we will have to work with relational databases again. It is a great pity Jessica
22-05-2019 05:25:05 -0400
Hi, Based on the information in this [link](, the database 'Template1' is used implicitly by Npgsql when accessing from Entity Framework. To resolve the error, I would create the required database (Template1) in the Virtual DataPort and provide necessary privileges over it to the user accessing from Entity Framework. In this scenario, it is not necessary to make any changes in the code. Hope this helps!
Denodo Team
29-05-2019 08:12:33 -0400
You must sign in to add an answer. If you do not have an account, you can register here