You can develop an IP for your data source by starting with the installed template IP, one of the installed examples, or a sample from the DataDirect code library at https://www.progress.com/datadirect-connectors
The steps in this section assume you are starting from the template IP installed at install_dir/ip/oanet/template. The template IP consists of stubs for each of the IP functions that you must implement.
If you start from one of the examples, the steps are the same as if you start from a template IP, except that you replace references to template with example. For code samples downloaded from the DataDirect code library, follow the instructions provided with the sample.
The template IP directory install_dir/ip/oanet/template shipped with OpenAccess SDK contains the following files:
• damip.cs – implementation of the IP API
• damip.csproj – Visual Studio project file
• AssemblyInfo.cs - assembly information
OpenAccess SDK also provides the following schema directories:
• ip/schema/template_static
• ip/schema/template_dynamic
The ip/schema/template_static directory contains the minimal OA_TABLES, OA_COLUMNS, OA_STATISTICS, and OA_FKEYS configuration required to use the OpenAccess SDK SQL Engine schema manager.
The ip/schema/template_dynamic directory contains the minimal OA_TABLES and OA_COLUMNS required to support views over dynamic schema and are used when the IP is implementing the schema management.
Note: The IP project that you use when setting up the source and schema depends on the version of the .NET Framework your IP will use:
• If you are using .NET Framework 4.0, use install_dir\ip\bin\oadamipnet40.dll
To set up the source and schema for a new IP:
1. Copy the contents of the ip/oanet/template directory and all subdirectories and file to a directory ip/damip/yourip and rename the template files. For example, on Windows, perform the following commands, replacing yourip with the name you have chosen for your IP:
a. In Windows Explorer, navigate to install_dir/ip/oanet.
b. Copy the template subdirectory to ip/damip/yourip.
c. The project file damip.csproj is set up to compile damip.cs and place the resulting DLL damip.dll in the folder install_dir\ip\bin.
2. If you want to rename the class to a different name, then perform the following steps:
a. Rename damip.cs file to {yourip} and edit this new file to modify the class name and the "using" clauses to change from damip to your selected name.
using oanet.damip;
namespace oanet.damip
b. Rename the damip.csproj file to yourip.csproj, open it, and modify it to include your renamed IP file.
The IP project must reference the following DLLs:
install_dir\ip\bin\oadamipnet.dll (oadamipnet40.dll if your IP will use .NET Framework 4.0) – this is a mixed-code DLL that exposes the openaccess.ndam class containing the OpenAccess SDK SQL Engine API. The installer adds this assembly to the GAC.
install_dir\ip\bin\oanet.sql.ip – 100% managed code that contains the IP API interface class oanet.sql.ip and other utility classes used to exchange data with the OpenAccess SDK SQL Engine. The installer adds this assembly to the GAC.
3. Compile your IP files using the damip.csproj (or yourip.csproj if you renamed it)
a. Open the project.
b. Compile it to create a .dll file that is placed in the install_dir\ip\bin subdirectory.
The name of the IP class that implements the oanet.sql.ip interface will be specified in the DataSourceIPClass data source attribute. The OpenAccess SDK SQL Engine creates an instance of this class for each connection.
4. Define how you will use schemas. The schema directory you create in this step will be used as the DataSourceIPSchemaPath attribute when configuring the Data Source for the OpenAccess SDK Service that will be used to access your data source. Refer to the OpenAccess SDK Administrator’s Guide for more information about the DataSourceIPSchemaPath attribute.
• If you are implementing a dynamic schema, in which the IP implements the SCHEMA function and can take advantage of SQL views, then copy the contents of ip\schema\template_dynamic directory to a directory ip\schema\yourip.
• If you are implementing the static schema feature, in which the OpenAccess SDK SQL Engine manages the schema, copy the contents of ip\schema\template_static subdirectory to directory ip\schema\yourip.
• Open Windows Explorer and navigate to install_dir\ip\schema.
• Copy folder template_static or template_dynamic to yourip.
The development environment and the schema folder for your IP are now set up. Next, set up the OpenAccess SDK service to access your data source.