# EsbGetDatabaseState

Description

EsbGetDatabaseState() gets a database's state structure, which contains user-configurable parameters for the database.

Syntax

    EsbGetDatabaseState (hCtx, AppName, DbName, pDbState)

    ByVal hCtx     As Long
    ByVal AppName  As String
    ByVal DbName   As String
          pDbState As ESB_DBSTATE_T

Parameters

hCtx | Essbase VB API context handle.
AppName | Application name.
DbName | Database name.
pDbState | Buffer to receive a database state structure.

Return Value

If successful, this function returns a pointer to a database state structure in pDbState.

Notes

- This function can get only a server database's state structure.

Access

To get a database's state structure, the connected user must have at least read access (ESB_PRIV_READ) to the database.

Example

    Declare Function EsbGetDatabaseState Lib "ESBAPIW" (ByVal hCtx As Long, ByVal AppName As String, ByVal DbName As String, pDbState As ESB_DBSTATE_T) As Long Sub ESB_GetDatabaseState()
       Dim sts As Long
       Dim AppName As String
       Dim DbName As String
       Dim DbState As ESB_DBSTATE_T

       AppName = "Sample"
       DbName = "Basic"

       '********************************
       '****** Get Database State ******
       '********************************
       sts = EsbGetDatabaseState(hCtx, AppName, DbName,
       DbState)
    End Sub

See Also

EsbGetApplicationState()
EsbGetDatabaseInfo()
EsbSetDatabaseState()
EsbGetDatabaseStats()