EsbOtlSetGenName

Description

EsbOtlSetGenName() sets the name for a specific generation within a dimension.

Syntax

EsbOtlSetGenName (hOutline, pszDimension, usGen, pszName)
ByVal hOutline     As Long
ByVal pszDimension As String
ByVal usGen        As Integer
ByVal pszName      As String

Parameters

hOutlineOutline context handle.
pszDimensionName of dimension that contains the generation.
usGenNumber of generation for which to set a name. The dimension itself is generation 1.
pszNameName to give the generation.

Return Value

Returns 0 if successful; otherwise one of the following:

OTLAPI_BAD_GENLEVELNAME
OTLAPI_ERR_GENLEVELNAMEEXISTS
OTLAPI_ERR_GENLEVELEXISTS
OTLAPI_ERR_GENLEVELVALUE
OTLAPI_ERR_NOTADIM
OTLAPI_ ERR_GENLEVELNAMEMBR

Notes

Example

Declare Function EsbOtlSetGenName Lib 
"ESBOTLW" (ByVal hOutline As Long, ByVal pszDimension As String,
ByVal usGen As Integer, ByVal pszName As String) As Long 

Sub ESB_OtlSetGenName()
Dim sts As Long
Dim Object As ESB_OBJDEF_T
Dim hOutline As Long
Dim Dimension As String
Dim GenNum As Integer
Dim GenName As String

Object.hCtx = hCtx
Object.Type = ESB_OBJTYPE_OUTLINE
Object.AppName = "Sample"
Object.DbName = "Basic"
Object.FileName = "Basic"

sts = EsbOtlOpenOutline(hCtx, Object, ESB_YES,
ESB_YES, hOutline)

'*****************************************
'********** Set Generation Name **********
'*****************************************
Dimension = "Year"
GenNum = 2
GenName = "Qtr1 Qtr2 Qtr3 Qtr4"
If Not sts Then
   sts = EsbOtlSetGenName(hOutline, Dimension,
GenNum, GenName)
End If
End Sub

See Also

EsbOtlDeleteGenName()
EsbOtlGetGenName()