Description

The CompDoc function is used to store multiple discrete records within a single record. The DataSet definition, compiled DataSet, and Connection definition records are stored as CompDoc records. Do not access or modify CompDoc records directly; instead, use the CompDoc function.

Syntax

success = CompDoc (instruction, doc, name, subdoc)

Parameters

The CompDoc function has the following parameters:

ParameterDescription
InstructionSpecifies the action to take on the CompDoc structure. The instruction values are defined in the insert record COMPDOC_EQUATES
DocThe CompDoc structure.
NameThe name of the sub-document.
SubdocThe body of the sub-document.

The following table explains how the name and subdoc parameters are used based on the instruction value:

instructionNameSubdoc
CD_LISTDOC$An @vm-delimited list of names is returned in name.Not used.
CD_PUTDOC$Pass the name of the sub-document to store.Pass the body of the sub-document to store.
CD_GETDOC$Pass the name of the sub-document to retrieve.The sub-document is returned in subdoc.
CD_DELDOC$Pass the name of the sub-document to delete.Not used.

Returns

A Boolean value representing success (true) or failure (false).

Example

* extract the ODBC definition for the ACCOUNTING connection
declare function Repository
$insert CompDoc_Equates
EntID   = @appid<1>: "*DATASOURCE*CONNECTION*ACCOUNTING"
Doc     = Repository("ACCESS", EntID)
Success = CompDoc(CD_GETDOC$, Doc, "ODBC", Def)
  • No labels