You can translate the question and the replies:

How do i connect the sql /postgres database with this c# application?

How do i connect the sql /postgres database with this c# application? Could you please help me on this? -------------------------------------------- I couldn't find the way to connect postgres and denodo. -------------------------------------------- I used microsoft sql server management studio 2014 to connect the denodo, and I connection properties are ; Name : sql_dbserver DB adapter : microsoft SQL Server 2014(JTDS)(deprecated) Driver class path: denodo-jtds-1.3.1 Driver class : net.sourceforge.jtds.jdbc.Driver Databae URI: jdbc:jtds:sqlserver://PC_Name/Samble_SQLDB Transaction isolation: Database default authentication: use login and password login : (microsoft SQL Server 2014 username) password; (microsoft SQL Server 2014 password) and above configuration worked properly ----------------------------------------------- I used thse connection parameters c# application;- "Server=localhost;Port=9997;User Id=admin;Password=admin;Database=sql_dbserver" sql_dbserver ;- is the name that I created denodo using Npgsql class in c# application -------------------------------------------------------------- when I open connection(example : con.open(); ) it shows exception -"Exception while reading from stream" Could you please help me on this ?
user
15-06-2022 03:05:26 -0400

6 Answers

Hello, I would make sure the connection string supplied in the C# application is properly configured to connect to Denodo datasource. In the above mentioned connection parameter, the port number should be changed from **9997** to **9996**. Also I would verify that the database name used matches with the virtual database name created in the VDP server, and not the actual underlying Postgres database or data source name. Hope this helps.
Denodo Team
15-06-2022 08:05:27 -0400
I have changed the port to 9996 , and used denodo username and password in connection string , and database name is same in both denodo and postgresql . string connectionString = "Server=localhost;Port=9996;Username=admin;Password=admin;Database=test"; Above string is the connection string And it generate the error when i call con.open() : authentication error: Database 'test' not found DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. but couldn't connect denodo and Application. Could you please help me on this.?
user
15-06-2022 08:32:36 -0400
Hello, Looking at the above log, I assume that the application is able to connect but not able to find the virtual database **test** and hence the error. I would try to verify the database name with what I have in my VDP setup and work up from there. Hope this helps.
Denodo Team
20-06-2022 07:53:54 -0400
Thank you very much , I have changed the database and getting more progress in Denodo thanks for the support , This is the code that Im using to connect denodo platform : string query = "SELECT * FROM car"; string connectionString = "Server=localhost;Port=9996;Username=admin;Password=admin;Database=new_sampledb;Timeout=30;CommandTimeout=30"; try { using (NpgsqlConnection connection = new NpgsqlConnection(connectionString)) { connection.Open(); using (NpgsqlCommand command = new NpgsqlCommand(query, connection)) { HandleReader(command, maxRows); } } When I open the connection it shows an exception that shown below, Could you please help me to undestand what is wrong in the above code? : View 'pg_type' not found DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.
user
20-06-2022 08:51:13 -0400
Hello, The VDP server is compatible with NPGSQL version 2.X. The recommended versions are 2.0.12, 2.2.0, 2.2.3 and 2.2.7; it also partially supports version 3.X. You could refer to the article at [Access Through an ADO.NET Data Provider — Virtual DataPort Developer Guide](https://community.denodo.com/docs/html/browse/8.0/en/vdp/developer/access_through_an_ado.net_data_provider/access_through_an_ado.net_data_provider) for the same. In case of such errors as above, I would try to use one of the compatible versions listed, and see if the issue is resolved. The later version of NPGSQL could be supported in some upcoming releases. Hope this helps.
Denodo Team
22-06-2022 07:16:01 -0400
Thank you very so much for your valuable replay , I connected successfully.
user
22-06-2022 07:56:18 -0400
You must sign in to add an answer. If you do not have an account, you can register here