EsbOtlRestructure

Description

EsbOtlRestructure() restructures an outline on the server. This is an asynchronous call.

Syntax

EsbOtlRestructure (hCtx, usRestructType)
ByVal hCtx           As Long
ByVal usRestructType As Integer

Parameters

hCtxServer login context handle. This must be the server on which the outline was saved using EsbOtlWriteOutline().
usRestructTypeType of restructuring to do. This can be one of the following values:

ESB_DOR_ALLDATA
ESB_DOR_INDATA
ESB_DOR_LOWDATA
ESB_DOR_NODATA

Return Value

Returns 0 if successful; otherwise:

OTLAPI_BAD_RESTRUCTTYPE

Notes

Access

This function requires you to have the appropriate level of access to the specified application and/or database to contain the outline object. To restructure the outline object, you must have Application Designer or Database Designer privilege (ESB_PRIV_APPDESIGN or ESB_PRIV_DBDESIGN) for the specified application or database containing the outline.

Example

Declare Function EsbOtlRestructure Lib 
"ESBOTLW.DLL" (ByVal hCtx As Long, ByVal 
usRestructType As Integer) As Long

Sub ESB_OtlRestructure()
Dim hCtx As Long
Dim sts As Long
Dim Object As ESB_OBJDEF_T
Dim hOutline As Long

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)

'***
'body of code
'write outline to server using
'EsbOtlWriteOutline()
'***
If sts = 0 Then
   sts = EsbOtlRestructure(hCtx, ESB_DOR_ALLDATA)
End If
'***
'need to call EsbGetProcessState()
'to check for completion before proceeding
'***
End Sub

See Also

EsbOtlOpenOutline()
EsbOtlNewOutline()
EsbOtlWriteOutline()
EsbOtlVerifyOutline()
EsbOtlCloseOutline()