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

hCtx

ESS_HCTX_T

API context handle.

pRulesObj

ESS_OBJDEF_T

Pointer to rules file object definition structure.

pDataObj

ESS_OBJDEF_T

Pointer to data file object definition structure.

pMbrUser

ESS_MBRUSER_T

SQL user structure (if data source is SQL database). A NULL SQL user structure indicates a non SQL data source.

ErrorName

ESS_STR_T

Name of error output file on client.

Notes

Return Value

None.

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