Using the .NET Connector v220.127.116.11
These examples show how you can use the EDB object classes that are provided by the EDB .NET Connector that allow a .NET application to connect to and interact with an EDB Postgres Advanced Server database.
To use these examples, place the .NET library files in the same directory as the compiled form of your application. All of these examples are written in C#, and each is embedded in an ASP.NET page. The same logic and code applies to other .NET applications (WinForm or console applications, for example).
Create and save the following
web.config file in the same directory as the sample code. The examples make use of the
DB_CONN_STRING key from this configuration file to return a connection string from the EDB Postgres Advanced Server host.
An EDB Postgres Advanced Server connection string for an ASP.NET web application is stored in the
web.config file. If you're writing an application that doesn't use ASP.NET, provide the connection information in an application configuration file such as