EssUpdateEx

Sends an update specification to the active database as a single string, capturing any data load errors in ppMbrError.

Syntax

ESS_FUNC_M  EssUpdateEx (hCtx, Store, Unlock, UpdtSpec, ppMbrError);
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.

UpdtSpec

ESS_STR_T

The update specification, as a single string (must be less than 32 KB).

ppMbrError

ESS_PPMBRERR_T

Pointer to linked list of errors contained in ESS_MBRERR_T. Possible errors are:

  • AD_MSGDL_ERRORLOAD—Unable to do dataload at Item/Record [number].

  • ESS_MBRERR_BADDATA—Invalid member [membername] in data column.

  • ESS_MBRERR_DBACCESS—You have insufficient access privilege to perform a lock on this database.

  • ESS_MBRERR_DUPLICATE—Duplicate members from the same dimension on data record, [number] records completed.

  • ESS_MBRERR_UNKNOWN—Unknown member [membername] in dataload, [number] records returned.

Notes

Return Value

Returns zero if successful; otherwise, returns an error code and the records that caused the error.

Access

This function requires the caller to have write privilege (ESS_PRIV_WRITE) to the active database.

Example

void TestUpdateEx()
{
	ESS_STS_T sts = ESS_STS_NOERR;
	ESS_PMBRERR_T pMbrError;
	ESS_STR_T updtSpec = "";

	sts = EssUpdateEx(hCtx, ESS_TRUE, ESS_FALSE, "'Jan' 'New York' 'Actual' 'Sales' '100-10' 123 \n '100-20' 345 \n '100-30' 678", &pMbrError);
	printf("EssUpdateEx sts: %ld\n",sts);
	if(!sts)
	{	
		printf("\nVerify data:\n");
		VerifyDataload("'Jan' 'New York' 'Actual' 'Sales' <IDESC '100'!"); 

		printf("\nMember Error Info:\n");
		if(pMbrError)
			DisplayError(pMbrError);
		else
			printf("\tError structure is empty.\n");
	}

	if(pMbrError)
		EssFree(hInst, pMbrError);
}

See Also