# EssUpdateFile

Description

EssUpdateFile() sends an update specification to the active database from a file. 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  EssUpdateFile (hDestCtx, hSrcCtx, AppName, DbName, FileName, Store, Unlock);

ESS_HCTX_T | hDestCtx
ESS_HCTX_T | hSrcCtx
ESS_STR_T | AppName
ESS_STR_T | DbName
ESS_STR_T | FileName
ESS_BOOL_T | Store
ESS_BOOL_T | Unlock

Parameters

hDestCtx | Essbase API context handle of target database on the server.
hSrcCtx | Essbase API context handle for report file location. The report file can reside on the client or on the same server as the target database.
AppName | Application name for update file location.
DbName | databasename for update file location.
FileName | Name of update specification file.
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

- If this function causes data to be stored (Store flag is TRUE), the relevant data blocks must previously have been locked for update (e.g. by calling EssReport() with the Lock flag set to TRUE).
- 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_FUNC_M
    ESS_UpdateFile (ESS_HCTX_T      hCtx)
    {
       ESS_FUNC_M    sts = ESS_STS_NOERR;
       ESS_HCTX_T   hSrcCtx;
       ESS_BOOL_T   isStore;
       ESS_BOOL_T   isUnlock;
       ESS_STR_T    AppName;
       ESS_STR_T    DbName;
       ESS_STR_T    FileName;

       AppName  = "Sample";
       DbName   = "Basic";
       hSrcCtx  = hCtx;
       isStore  = ESS_TRUE;
       isUnlock = ESS_FALSE;
       sts = EssUpdateFile (hCtx, hSrcCtx, AppName,
             DbName, FileName, isStore, isUnlock);
       return(sts);
    }

See Also

EssBeginUpdate()
EssReportFile()
EssUpdate()