EssBuildDimension

Description

EssBuildDimension() allows the addition or removal of members from the outline in the active database from a data file and rules file.

Syntax

ESS_FUNC_M EssBuildDimension (hCtx, rulesObj, dataObj,
mbrUser, ErrorName);
ESS_HCTX_ThCtx
ESS_POBJDEF_T pRulesObj
ESS_POBJDEF_T pDataObj
ESS_PMBRUSER_T pMbrUser
ESS_STR_TErrorName

Parameters

hCtxEssbase API context handle.
pRulesObjPointer to rules file object definition structure.
pDataObjPointer to data file object definition structure.
pMbrUserSQL user structure (if data source is SQL database). A NULL SQL user structure indicates a non SQL data source.
ErrorNameName of error output file on client.

Return Value

None.

Notes

Access

This function requires the caller to have database design privilege for the specified database (ESS_PRIV_DBDESIGN).

Example

ESS_FUNC_M
ESS_BuildDim(ESS_HCTX_T hCtx)
{
   ESS_FUNC_M    sts = ESS_STS_NOERR;
   ESS_OBJDEF_T  RulesObj;
   ESS_OBJDEF_T  DataObj;
   ESS_MBRUSER_T User;                   
   ESS_STR_T     ErrorName;
   
   RulesObj.hCtx     = hCtx;
   RulesObj.FileName = "Prodmap";         
   RulesObj.ObjType  = ESS_OBJTYPE_RULES;  
   
   DataObj.hCtx      = hCtx;
   DataObj.FileName  = "Prodtabl";         
   DataObj.ObjType   = ESS_OBJTYPE_TEXT;    
    
   ErrorName         = "builddim.err";
   
   sts               = EssBuildDimension (hCtx, &RulesObj, &DataObj,  
                       NULL, ErrorName);
   return (sts);
   /*******************************************************************/
   /*                                                                 */
   /* When a SQL data source is defined in the rules file, define     */
   /* the variables in the ESS_OBJDEF_T DataObj structure as follows: */
   /*    DataObj.hCtx     = hCtx;                                     */
   /*    DataObj.AppName  = NULL;                                     */
   /*    DataObj.DbName   = NULL;                                     */
   /*    DataObj.ObjType  = ESS_OBJTYPE_NONE;                         */
   /*    DataObj.FileName = NULL;                                     */
   /*                                                                 */
   /* Also, provide strings for the variables in the ESS_MBRUSER_T    */
   /* User structure; for example:                                    */
   /*    User.User     = "Dbusernm";                                  */
   /*    User.Password = "Dbpasswd";                                  */
   /*                                                                 */
   /* Use a blank string for User and Password, if the SQL source     */ 
   /* does not require user and password information; for example:    */
   /*    User.User     = "";                                          */
   /*    User.Password = "";                                          */
   /*                                                                 */
   /* Also, define sts as follows:                                    */
   /*    sts =  EssBuildDimension (hCtx, &RulesObj, &DataObj,         */
   /*           &User, ErrorName);                                    */
   /*                                                                 */
   /*******************************************************************/ 
}

See Also

EssImport()