EssEndDataload
Description
EssEndDataload() marks the end of an update specification
being sent to the active database, and must be called
after sending the update specification using EssSendString().
Syntax
ESS_STS_T EssEndDataload (hCtx, ppMbrError);
Parameters
hCtx | Essbase API context handle. |
ppMbrError | Pointer to the linked list of errors contained in
ESS_MBRERR_T. Possible errors (and error strings) are:
- ESS_MBRERR_UNKNOWN (Unknown member [membername] in dataload, [number] records returned.)
- ESS_MBRERR_DBACCESS (You have insufficient access privilege to perform a lock on this database.)
- ESS_MBRERR_BADDATA (Invalid member [membername] in data column.)
- ESS_MBRERR_DUPLICATE (Duplicate members from the same dimension on data record, [number] records completed.)
- AD_MSGDL_ERRORLOAD (Unable to do dataload at Item/Record [number].)
|
Return Value
Returns zero, if successful. Otherwise, returns an error code, as follows:
-
If abortOnError is TRUE:
-
The error code for the first error condition is returned.
-
The error list is NULL.
-
If abortOnError is FALSE:
-
An error list is returned, if the server can process the data and can continue.
-
Otherwise, in exceptional circumstances, the error code explaining why the server cannot continue is returned. For example:
AD_MSGDL_COLS (too many data values in a record)
AD_MSGDL_MISDIM (data value encountered before all dimensions selected)
Notes
- EssEndDataload() must be preceded by a call to EssBeginDataload(),
and at least one call to EssSendString().
-
The memory allocated for ppMbrErr must be freed using EssFreeMbrErr().
Access
EssEndDataload() requires the caller to have write privilege (ESS_PRIV_WRITE)
to the active database.
Example
ESS_STS_T sts = ESS_STS_NOERR;
ESS_BOOL_T Store;
ESS_BOOL_T Unlock;
ESS_STR_T Query1, Query2;
ESS_PMBRERR_T pMbrErr;
Store = ESS_TRUE;
Unlock = ESS_FALSE;
Query1 = "Year Market Scenario Measures Product 12345";
Query1 = " Jan East Scenario Measures Coke 125";
/* Begin Update */
sts = EssBeginDataload (hCtx, Store, Unlock, ESS_FALSE, ESS_NULL);
/* Send update specification */
if(!sts)
sts = EssSendString(hCtx, Query1);
sts = EssSendString(hCtx, Query2);
/* End Update */
if(!sts)
sts = EssEndDataload(hCtx, &pMbrErr);
See Also
EssBeginDataload()
EssSendString()
EssBeginUpdate()
EssEndUpdate()
EssUpdate()