Databases Reference
In-Depth Information
As you can see in the previous screenshot, the Essbase supplied API declaration
module includes all of the necessary global variables and other API related
structures, as well as all of the API function calls. What a nice thing to have!
How to code an API function
In the following example, we will code an Essbase API function that returns
database information into an Essbase private type structure named DBINFO :
Sub GetDataBaseInfo(Appname as String, DBName as String)
'Pass Application name and Database name to VB subroutine
Dim sts as ESB_STS_T 'Dimension return code variable
Dim hCtx as ESB_HCTX_T 'Dimension API handle context
Dim DbInfo as ESB_DBINFO_T 'Dimension DB information variable
sts = EsbGetDatabaseInfo (hCtx, Appname, DBName, DbInfo) 'Execute
'API function
If sts = ESB_STS_NOERR ' Test API function return code
Call DisplayDatabaseInformation 'Branch to new subroutine on
'satisfactory return code
End If
End Sub
After a successful call to the Essbase API EsbGetDatabaseInfo function, the DbInfo
structure will be populated with a variety of database information for the database
that was passed to the function. The following is an example of the variable structure
showing what database information is returned.
Type ESB_DBINFO_T
'Elapsed database time
ElapsedDbTime
As Long
'Data File Cache size database
DataFileCacheSetting
As Long
DataFileCacheSize
As Long
DataCacheSetting
As Long
'run-time size of the Data cache
DataCacheSize
As Long
IndexCacheSetting
As Long
'size of the Index cache
IndexCacheSize
As Long
IndexPageSetting
As Long
'run-time size of an Index Page
IndexPageSize
As Long
'number of dimensions
nDims
As Long
 
Search WWH ::




Custom Search