Opens and reads in an existing outline. You must call this function (or EsbOtlNewOutline()) before any operations on the outline can take place.
Syntax
EsbOtlOpenOutline (hCtx, pObject, fLock, fKeepTrans, phOutline) ByVal hCtx As Long pObject As ESB_OBJDEF_T ByVal fLock As Integer ByVal fKeepTrans As Integer phOutline As Long
Parameter | Description |
---|---|
hCtx | Essbase Context handle. |
pObject | Outline object to open. |
fLock | Flag to determine if the outline should be locked when it is opened. This is valid only for server outlines. |
fKeepTrans | Flag to determine whether to keep transactions. If you are opening an existing outline to make changes, and you intend to restructure the database and keep data, we recommend that you set this flag to ESB_YES. When ESB_YES, a log is kept of activities done to the outline. If you are starting from an empty outline or are not planning on saving data when you restructure, we recommend that you set this field to ESB_NO. When ESB_NO, no log is kept, saving time and memory. |
phOutline | Return variable for ESB_HOUTLINE_T variable. This handle is set by the API and should be passed to subsequent Outline API functions. |
Notes
If the outline file exists on the server, this call copies the file locally for client access.
Return Value
Returns 0 if successful; otherwise one of the following:
OTLAPI_BAD_OBJTYPE
OTLAPI_ERR_FILEOPEN
OTLAPI_ERR_FILEIO
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 lock the outline object (lock flag is ESB_YES), 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 EsbOtlOpenOutline Lib "ESBOTLN.DLL" (ByVal hCtx As Long, pObject As ESB_OBJDEF_T, ByVal fLock As Integer, ByVal fKeepTrans As Integer, phOutline As Long) As Long Sub ESB_OtlOpenOutline() 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) End Sub
See Also