Access Through an ADO.NET Data Provider¶
ADO.Net data providers are software components that allow their users to develop applications that are independent of the database they want to use.
The version 3.x of NPGSQL is supported partially. You can execute SELECT, INSERT, UPDATE and DELETE queries but not inspect the views of the Virtual DataPort databases.
From your application, you can do the following:
Create a new object of the class
NpgsqlConnection, passing the connection string to the constructor. This is what the example of
Or, define the ADO.Net provider in the global
machine.configfile or in the
.configfile of the application and from your application, request a connection to the Npgsql factory and set the appropriate connection string. This option allows you write code that is independent of database you are using.
<?xml version="1.0" encoding="iso-8859-1" ?> <configuration> <system.data> <DbProviderFactories> <add name="Npgsql Data Provider" invariant="Npgsql" support="FF" description="ADO.Net Data Provider to Denodo" type="Npgsql.NpgsqlFactory, Npgsql, Version=126.96.36.199, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" /> </DbProviderFactories> </system.data> </configuration>
string connectionString = "Server=acme;" + "Port=9996;" + "Username=admin;" + "Password=admin;" + "Database=admin" + "CommandTimeout=80000";
If the name of the database contains non-ASCII characters, they have to
be URL-encoded. For example, if the name of the database is “テスト”,
set the property
The default query timeout of the connection is established in the
CommandTimeout parameter (time in milliseconds). In this connection,
the timeout will be 80 seconds.
The value of the i18n of the connection is set in the
parameter of the connection string. The section Parameters of the ODBC driver and their default value describes this property and its default value.
If SSL was enabled in the Virtual DataPort server to secure the
communications, add the following parameters to
The page http://www.npgsql.org/doc/connection-string-parameters.html
lists the parameters of the