# EssGetDatabaseInfo

Description

EssGetDatabaseInfo() gets a database's information structure, which contains non user-configurable parameters for the database.

Syntax

    ESS_FUNC_M EssGetDatabaseInfo (hCtx, AppName, DbName, ppDbInfo);

ESS_HCTX_T | hCtx
ESS_STR_T | AppName
ESS_STR_T | DbName
ESS_PPDBINFO_T | ppDbInfo

Parameters

hCtx | Essbase API context handle.
AppName | Application name.
DbName | Database name.
ppDbInfo | Address of pointer to receive allocated database info structure.

Return Value

If successful, this function returns a pointer to an allocated database info structure in ppDbInfo.

Notes

- The memory allocated for the ppDBInfo structure should be freed using EssFree().
- This function can only get the information structure for a server database.

Access

This function requires the caller to have at least read access (ESS_PRIV_READ) to the specified database.

Example

    ESS_FUNC_M
    ESS_GetDbInfo (ESS_HCTX_T  hCtx,
                   ESS_HINST_T hInst
                  )
    {
       ESS_FUNC_M        sts = ESS_STS_NOERR;
       ESS_PDBINFO_T    DbInfo;
       ESS_STR_T        AppName;
       ESS_STR_T        DbName;
       AppName = "Sample";
       DbName  = "Basic";

       sts = EssGetDatabaseInfo (hCtx, AppName,
             DbName, &DbInfo);
       if (!sts)
       {
          if (DbInfo)
          {
             EssFree (hInst, DbInfo);
          }
       }
       return(sts);
    }

See Also

EssGetApplicationInfo()
EssGetDatabaseInfoEx()
EssGetDatabaseState()
EssGetDatabaseStats()