Writes the existing outline information to disk.
Syntax
EsbOtlWriteOutline (hOutline, pObject) ByVal hOutline As Long pObject As ESB_OBJDEF_T
Parameter | Description |
---|---|
hOutline | Outline context handle. |
pObject | Outline object to write. |
Notes
If you are saving the outline as a server object, it is initially saved as an .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).
Return Value
Returns 0 if successful; otherwise one of the following:
OTLAPI_BAD_OBJTYPE
OTLAPI_ERR_NOTVERIFIED
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 "ESBOTLN" (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