Stores an updated version of an LRO on the server.
Syntax
ESS_FUNC_M EssLROUpdateObject (hCtx, plinkId, usOption, pLRODesc);
| Parameter | Data Type | Description |
|---|---|---|
hCtx | ESS_HCTX_T | API context handle. |
plinkId | ESS_LROHANDLE_API_T | Pointer to object identification structure. |
usOption | ESS_USHORT_T | Option specifying whether to store the object, its catalog entry, or both. Use one of the following:
|
pLRODesc | ESS_LRODESC_API_T | Pointer to object's description structure. |
Notes
The linked object can be any of the following types:
A flat file, such as a Word document, Excel spreadsheet, or bitmap image.
A cell note containing up to 599 characters of text.
A link to another Essbase database (Linked Partitions feature).
Cell notes are part of the catalog entry for an object. To store a cell note, use ESS_LRO_CATALOG_API for the usOption parameter. The linked note is contained in structure ESS_LRODESC_API_T.
The name of the last user to modify the object and the modification date are also updated.
Return Value
If successful, returns ESS_STS_NOERR. Otherwise, returns an error code.
Access
A call to this function requires write privileges (ESS_PRIV_WRITE) to the active database.
Example
ESS_STS_T ESS_LRO UpdateObject (ESS_HCTX_T hCtx)
{
ESS_STS_T sts = ESS_STS_NOERR;
ESS_LROHANDLE_API_T linkId;
ESS_LRODESC_API_T lroDesc;
ESS_USHORT_T usOption = 2; /* Default is catalog */
memset (&linkId, 0, sizeof(ESS_LROHANDLE_API_T));
memset (&lroDesc, 0, sizeof(ESS_LRODESC_API_T));
linkId.hObject = 25;
linkId.cellKey.cellOffset = 149;
linkId.cellKey.blkOffset = 113.0;
linkId.cellKey.segment = 0.0;
/* Linked object is a LRO. (Windows Application) */
lroDesc.usObjType = 1;
/* Update both object and catalog */
usOption = ESS_LRO_BOTH_API;
strcpy (lroDesc.lro.lroInfo.objName, "e:\\lro\\lroex.c");
strcpy (lroDesc.lro.lroInfo.objDesc, "My C file");
strcpy (lroDesc.userName, "user1");
lroDesc.linkId.hObject = linkId.hObject;
sts = EssLROUpdateObject(hCtx, &linkId, usOption, &lroDesc);
if (sts)
{
printf("Could not update linked object.\n");
}
return sts;
}See Also