# EsbOtlWriteOutline

Description

EsbOtlWriteOutline() writes the existing outline information to disk.

Syntax

    EsbOtlWriteOutline (hOutline, pObject)

    ByVal hOutline As Long
          pObject  As ESB_OBJDEF_T

Parameters

hOutline | Outline context handle.
pObject | Outline object to write.

Return Value

Returns 0 if successful; otherwise one of the following:

OTLAPI_BAD_OBJTYPE
OTLAPI_ERR_NOTVERIFIED

Notes

- If you are saving the outline as a server object, it is initially saved as a

      .OTN

  file. You should then call EsbOtlRestructure() to create the actual

      .OTL

  file.
- If you are saving the outline as a server object, the object name must be the same as the database name.
- The database must already exist if you are saving a server outline object, or a client outline object to a local database.
- This call fails if the outline is not currently locked by the specified user (hCtx parameter in the ESB_OBJDEF_T structure).

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 write 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 EsbOtlWriteOutline Lib
    "ESBOTLW" (ByVal hOutline As Long,
    pObject As ESB_OBJDEF_T) As Long

    Sub ESB_OtlWriteOutline()
    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
    If sts = 0 Then
       sts = EsbOtlWriteOutline(hOutline, Object)
    End If

    'restructure db using EsbOtlRestructure()
    End Sub

See Also

EsbOtlOpenOutline()
EsbOtlNewOutline()
EsbOtlVerifyOutline()
EsbOtlRestructure()
EsbOtlCloseOutline()