Restructures an outline on the server. This is an asynchronous call.
Syntax
EsbOtlRestructure (hCtx, usRestructType) ByVal hCtx As Long ByVal usRestructType As Integer
Parameter | Description |
---|---|
hCtx | Server login context handle. This must be the server on which the outline was saved using ESBOTLNriteOutline(). |
usRestructType | Type of restructuring to do. This can be one of the following values:
|
Notes
The caller must have saved the outline using ESBOTLNriteOutline() before calling this function.
This call is only valid for outlines saved to the server.
This call is asynchronous. You should call EsbGetProcessState() after making this call until EsbGetProcessState() returns a status indicating the restructure operation is complete.
In order for data to be properly restructured (saving data), the outline must have been opened using EsbOtlOpenOutline() with the fKeepTrans flag set to ESB_YES.
Return Value
Returns 0 if successful; otherwise:
OTLAPI_BAD_RESTRUCTTYPE
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 "ESBOTLN.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 'ESBOTLNriteOutline() '*** 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