Starts sending an update specification to the active database. This call must be followed by successive calls to EssSendString() to send the update specification, and finally by a call to EssEndUpdate(). The update data can either be stored in the database, or just verified and any errors returned. Also, any data blocks locked for update can be unlocked by this call.
Syntax
ESS_FUNC_M EssBeginUpdate (hCtx, Store, Unlock);
Parameter | Data Type | Description |
---|---|---|
hCtx | ESS_HCTX_T | API context handle. |
Store | ESS_BOOL_T | Controls storage of data. If TRUE, data is stored in the server; if FALSE, no data is stored. |
Unlock | ESS_BOOL_T | Controls unlocking of data blocks. If TRUE, all relevant blocks which are locked will be unlocked (after data is stored, if necessary). If FALSE, no blocks are unlocked. |
Notes
This function must be followed by at least one call to EssSendString(), followed by a call to EssEndUpdate().
Each string passed to EssSendString() following this function must be terminated with a carriage return/linefeed character sequence ("\r\n").
If both the Store and Unlock flags are set to FALSE, the database merely performs a syntax check of the update specification.
Unicode clients using the C Main API to communicate with Unicode-enabled Essbase applications must send the UTF-8 encoded Unicode byte order mark (BOM) in the text stream immediately after calling this function. For an example, see Specifying the Byte Order Encoding.
Return Value
None.
Access
This function requires the caller to have write privilege (ESS_PRIV_WRITE) to the active database.
Example
ESS_VOID_T ESS_BeginUpdate(ESS_HCTX_T hCtx) { ESS_FUNC_M sts = ESS_STS_NOERR; ESS_BOOL_T Store; ESS_BOOL_T Unlock; ESS_STR_T Query; Store = ESS_TRUE; Unlock = ESS_FALSE; Query = "Year Market Scenario Measures Product 12345"; /* Begin Update */ sts = EssBeginUpdate (hCtx, Store, Unlock); /* Send update specification */ if(!sts) sts = EssSendString(hCtx, Query); /* End Update */ if(!sts) sts = EssEndUpdate(hCtx); }
See Also