The following example uses the provider-specific objects to connect to a database using the Oracle data provider from an application developed in Visual Studio using C#.
1. In the Solution Explorer, right-click References, and then select Add Reference.
2. Select the OpenAccess SDK data provider in the component list of the Add Reference dialog box.
3. Click OK. The Solution Explorer now includes DDTek.OpenAccess, the assembly for the OpenAccess SDK data provider.
4. Add the data provider’s namespace to the beginning of your application, as shown in the following C# code fragment:
// Access database
using System.Data;
using OpenAccess.dll;
5. Add the connection information for your server and exception handling code, and close the connection, as shown in the following C# code fragment:
OpenAccessConnection DBConn = new OpenAccessConnection("Host=test; Port=19986;User ID=test01;Password=test01");