EssLROGetObject

Retrieves an object linked to a data cell in an Essbase database.

Syntax

ESS_FUNC_M EssLROGetObject (hCtx, plinkId, targetFile, usOption, 
pRetLRODesc);
ParameterData TypeDescription

hCtx

ESS_HCTX_T

API context handle.

plinkId ;

ESS_LROHANDLE_API_T

Pointer to object identification structure.

targetFile

ESS_STR_T

The name of the target file into which the object is retrieved.

usOption

ESS_USHORT_T

Option specifying whether to retrieve the object, its catalog entry, or both. Use one of the following:

  • ESS_LRO_OBJ_API retrieves only the object.

  • ESS_LRO_CATALOG_API retrieves only the catalog entry.

  • ESS_LRO_BOTH_API retrieves object and catalog entry.

pRetLRODesc

ESS_LRODESC_API_T

Pointer to object's description structure..

Notes

Cell notes are part of the catalog entry for an object. To retrieve a cell note, use ESS_LRO_CATALOG_API for the usOption parameter. The linked note is contained in structure ESS_LRODESC_API_T.

Return Value

If successful, returns ESS_STS_NOERR. Otherwise, returns an error code.

Access

A call to this function requires read privileges (ESS_PRIV_READ) for the active database.

Example

ESS_FUNC_M ESS_LRO GetObject (ESS_HCTX_T hCtx)
{
        ESS_FUNC_M              sts = ESS_STS_NOERR;
        ESS_LROHANDLE_API_T     linkId;
        ESS_LRODESC_API_T       lroDesc;
        ESS_USHORT_T            usOption = 2;  /* Default is catalog */
        ESS_CHAR_T              targetFile[ESS_ONAMELEN_API];
        memset(&lroDesc, 0, sizeof(ESS_LRODESC_API_T));
        memset(&linkId, 0, sizeof(ESS_LROHANDLE_API_T));
        /* Linked object is a LRO. (Windows Application) */
        linkId.hObject = 4;
        linkId.cellKey.cellOffset = 136;
        linkId.cellKey.blkOffset = 113.0;
        linkId.cellKey.segment = 0.0;
        usOption = ESS_LRO_BOTH_API ;  /* Get the catalog and the object */
        strcpy ( targetFile , "c:\\temp\\lrofile");
        sts = EssLROGetObject(hCtx, &linkId, targetFile, usOption, &lroDesc);
        if (sts)
        {
                printf("Could not get object\n");
        }
        return sts;
}

See Also