# EsbOtlCreateAliasTable

Description

EsbOtlCreateAliasTable() creates an empty alias table in the outline.

Syntax

    EsbOtlCreateAliasTable (hOutline, pszAliasTable)

    ByVal hOutline      As Long
    ByVal pszAliasTable As String

Parameters

hOutline | Outline context handle.
pszAliasTable | Name of alias table to create.

Return Value

Returns 0 if successful; otherwise one of the following:

OTLAPI_ERR_ALIASTABLEEXISTS
OTLAPI_ERR_MAXALIASTABLES
OTLAPI_ERR_ALIASTABLENAME

Notes

- An alias table named "Default" cannot be created, since the default alias table always exists.
- The maximum number of alias tables in a single outline (including the default table) is 10.

Example

    Declare Function EsbOtlCreateAliasTable Lib
    "ESBOTLW" (ByVal hOutline As Long,
    ByVal pszAliasTable As String) As Long

    Sub ESB_OtlCreateAliasTable()
    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)

    If sts = 0 Then
       sts = EsbOtlCreateAliasTable(hOutline,
        "Alias Table 1")
    End If
    End Sub

See Also

EsbOtlCopyAliasTable()
EsbOtlRenameAliasTable()
EsbOtlDeleteAliasTable()