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);
ParameterData TypeDescription

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

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