EsbBuildDimFile

Description

EsbBuildDimFile() builds a data file used to add or remove members from the active database outline. See EsbBuildDimension() for more information.

Syntax

EsbBuildDimFile (hCtx, RulesObj, DataObj, MbrUser, 
ErrorName, fOverwriteErrorFile)
ByVal hCtx             As Long
      pRules           As ESB_OBJDEF_T 
      pData            As ESB_OBJDEF_T 
      pUser            As ESB_MBRUSER_T 
ByVal ErrName          As String
ByVal ErrFileOverwrite As Integer

Parameters

hCtxEssbase API context handle.
RulesObjPointer to rules file object definition structure.
DataObjPointer to data file object definition structure.
MbrUserSQL user structure (if data source is SQL database). NULL structure indicates a non-SQL data source.
ErrorNameName of error output file on client.
fOverwriteErrorFileA Boolean value which detemines whether this function overwrites an existing file of name ErrorFile.

Return Value

Returns zero (o) if successful.

Notes

Access

This function requires database design privilege ESB_PRIV_DBDESIGN for the specified database.

Example

Declare Function EsbBuild   Dimension Lib "ESBAPIW" (ByVal hCtx As Long, Rules As ESB_OBJDEF_T, Data As ESB_OBJDEF_T, User As ESB_MBRUSER_T, ByVal ErrName As String) As Long
Sub ESB_BuildDimFile()
   Dim sts As Long
   Dim Rules As ESB_OBJDEF_T
   Dim Data As ESB_OBJDEF_T
   Dim User As ESB_MBRUSER_T
   Dim ErrorName As String

   '*********************************
   ' Rules file resides at the server
   '********************************* 
   Rules.hCtx = hCtx
   Rules.Type = ESB_OBJTYPE_RULES 
   Rules.FileName = "Test" 

   '********************************
   ' Data file resides at the server
   '******************************** 
   Data.hCtx = hCtx
   Data.Type = ESB_OBJTYPE_TEXT
   Data.FileName = "Data"
   '**********************************
   ' For a non SQL data source provide
   ' empty strings in User structure
   '********************************** 
   User.User = ""
   User.Password = ""

   '********************************
   ' Specify file to redirect errors 
   ' to if any 
   '******************************** 
   ErrorName = "BUILDDIM.ERR"

   '*****************
   ' Build Dimensions
   '*****************

   sts = ESB_BuildDimFile (hCtx, Rules, Data, User, ErrorName) 
End Sub

See Also

EsbImport()
EsbBuildDimension()
EsbBuildDimStart()
EsbOtlRestructure()
EsbUnlockObject()