# EssBeginUpdate

Description

EssBeginUpdate() 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);

ESS_HCTX_T | hCtx
ESS_BOOL_T | Store
ESS_BOOL_T | Unlock

Parameters

hCtx | Essbase API context handle.
Store | Controls storage of data. If TRUE, data is stored in the server; if FALSE, no data is stored.
Unlock | 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.

Return Value

None.

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.

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

EssBeginReport()
EssEndUpdate()
EssSendString()
EssUpdate()
EssUpdateFile()