Local connection

With the local connection, you can retrieve data through calls to programs or functions in dynamic link libraries (DLL) that run on the server.

When you run a Master Template, the Data Manager calls programs and functions in the respective DLL files. Specify the location of these files in the connection configuration in KCM Core Administrator.

Usage

To use this connection type, follow these steps:

  1. Open the required DID document and locate a DID module that contains local connection entries.

    A DID can contain multiple local connection modules.

  2. Set the CONNECTION attribute to LOCAL.

  3. Set the MODEL_DOC_STATEMENT to WITH for a single entry to retrieve only one record or FORALL for an entry where zero, one, or more records need to be retrieved.

  4. Set the CALLING_CONVENTION attribute of an entry to one of the following values:

    • For a program, set to PROGRAM. Specify the name of the program to call in the DATA_RETRIEVAL or KEY_RETRIEVAL attributes.

    • For a 32-bit or 16-bit DLL, set to DLL32 or DLL16, respectively. Specify the name of the function to call in the DATA_RETRIEVAL or KEY_RETRIEVAL attributes. The name must follow this form: <functionname>@<dllname>. For example, Customer@Example.dll.

Example

DEFINE_ENTRY
   NAME                     MyEntry
   MODEL_DOC_STATEMENT      WITH
   CALLING_CONVENTION       PROGRAM
   DATA_RETRIEVAL           "MyProg.exe"
   KEY_RETRIEVAL            "*NONE"

In this example, a local connection entry MyEntry uses a program MyProg.exe to retrieve data.

Example

DEFINE_ENTRY
   NAME                     MyEntry
   MODEL_DOC_STATEMENT      WITH
   CALLING_CONVENTIONS      DLL32
   DATA_RETRIEVAL           "MyEntry@MyDll.dll"
   KEY_RETRIEVAL            "*NONE"

In this example, a local connection entry MyEntry uses a function in a 32-bit DLL to retrieve data.

All data types are supported for Fields in a local connection entry.