EsbExport

Description

EsbExport() exports a database to an ASCII file.

Syntax
EsbExport (hCtx, AppName, DbName, FilePath, Level, isColumns)
ByVal hCtx      As Long
ByVal AppName   As String
ByVal DbName    As String
ByVal FilePath  As String
ByVal Level     As Integer
ByVal isColumns As Integer

Parameters

hCtxEssbase VB API context handle.
AppNameName of application to archive.
DbNameName of database to archive.
FilePathFull path name of server file to contain archive information.
LevelControls level of data to export. Should be one of:
ESB_DATA_ALL - export all levels of data.
ESB_DATA_LEVEL0 - only export all data from level zero blocks.
ESB_DATA_INPUT - only export data from input level blocks.
isColumnsControls output of data blocks in column format.

Return Value

None.

Notes

Access

This function requires the caller to have access to the database, and to have selected it as their active database using EsbSetActive().

Example

Declare Function EsbExport Lib "ESBAPIW" (ByVal hCtx As Long, ByVal AppName As String, ByVal DbName As String, ByVal FilePath As String, ByVal Level As Integer, ByVal Columns As Integer) As Long

Sub ESB_Export ()
   Dim sts As Long
   Dim AppName As String 
   Dim DbName As String
   Dim PathName As String
   Dim Level As Integer
   Dim Columns As Integer
   Dim ProcState As ESB_PROCSTATE_T 

   AppName = "Sample"
   DbName = "Basic"
   PathName = "c:\essbase\main.txt"
   Level = ESB_DATA_INPUT
   Columns = ESB_YES
   '******************************
   ' Export input level data only
   '******************************
   sts = EsbExport (hCtx, AppName, DbName,
   PathName, Level, Columns) 
   '************************************
   ' Check process state till it is done 
   '************************************
   sts = EsbGetProcessState (hCtx, ProcState)
    Do Until ProcState.State = ESB_STATE_DONE 
      sts = EsbGetProcessState (hCtx, ProcState)
   Loop 
End Sub

See Also

EsbImport()