Using the .NET Connector v4.1.6.1

The sections that follow provide examples that demonstrate using the EDB object classes that are provided by the EDB .NET Connector that allow a .NET application to connect to and interact with an Advanced Server database.

To use the examples in this guide, place the .NET library files in the same directory as the compiled form of your application. All of the examples are written in C# and each is embedded in an ASP.NET page; the same logic and code would be applicable with other .NET applications (WinForm or console applications, for example).

Please 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 Advanced Server host.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
      <add key="DB_CONN_STRING" value="Server=127.0.0.1;Port=5444;
      User Id=enterprisedb;Password=enterprisedb;Database=edb" />
</appSettings>
</configuration>

An Advanced Server connection string for an ASP.NET web application is stored in the web.config file. If you are writing an application that does not use ASP.NET, provide the connection information in an application configuration file (such as app.config).