# EsbOtlVerifyOutline

Description

EsbOtlVerifyOutline() verifies that an outline is correct. The function returns both global outline errors and errors for each incorrect member.

Syntax

    EsbOtlVerifyOutline (hOutline, pulErrors, pulCount)

    ByVal hOutline  As Long
          pulErrors As Long
          pulCount  As Long

Parameters

hOutline | Outline context handle.
pulErrors | Return variable representing the bitmask for return of global outline errors. Currently, this field has only one value: ESB_OUTERROR_CURTOOMANYDIMS
pulCount | Count of members with errors.

Return Value

Returns 0 if successful; otherwise one of the following:

ESB_OUTERROR_SHAREUDA
ESB_OUTERROR_DUPGENLEVNAME

Notes

- This function checks for duplicate user attributes in shared members and duplicate level or generation names or aliases.
- Saving the outline to the server succeeds only when the outline is free of errors (*pulErrors == 0 and *pulCount == 0).
- To retrieve error values, follow these steps:
  1. Allocate an ESB_OUTERROR_T structure.
  2. Call EsbGetNextItem() once for each member error
  (returned in the pulCount variable).
  Each call to EsbGetNextItem() returns the error information for a member in an ESB_OUTERROR_T structure.

Example

    Declare Function EsbOtlVerifyOutline Lib
    "ESBOTLW" (ByVal hOutline As Long, pulErrors As Long,
    pulCount As Long) As Long

    Sub ESB_OtlVerifyOutline()
    Dim sts As Long
    Dim Object As ESB_OBJDEF_T
    Dim hOutline As Long
    Dim ulErrors As Long
    Dim ulCount As Long
    Dim pOutError As ESB_OUTERROR_T

    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 = EsbOtlVerifyOutline(hOutline,
        ulErrors, ulCount)
       Do While sts = 0 And ulCount > 0
         sts = EsbGetNextItem(hCtx,
           ESB_OUTERROR_TYPE, pOutError)
           ulCount = ulCount - 1
           'do something with the error value
       Loop
    End If
    End Sub

See Also

EsbOtlNewOutline()
EsbOtlOpenOutline()
EsbOtlWriteOutline()