Table of Contents Previous Next


5 Using the .NET Connector : 5.1 Opening a Database Connection : 5.1.3 Example - Opening a Database Connection from a Console Application

Before writing the code for the console application, create an app.config file that stores the connection string to the database. Using a configuration file makes it convenient to update the connection string if the information changes.
Save the file as EDBConnection-Sample.cs and compile it with the following command:
Compiling the sample should generate a Console.exe file; you can execute the sample code by entering Console.exe. When executed, the console should verify that the:

5 Using the .NET Connector : 5.1 Opening a Database Connection : 5.1.3 Example - Opening a Database Connection from a Console Application

Table of Contents Previous Next