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_ThCtx
ESS_BOOL_TStore
ESS_BOOL_TUnlock

Parameters

hCtxEssbase API context handle.
StoreControls storage of data. If TRUE, data is stored in the server; if FALSE, no data is stored.
UnlockControls 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

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