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_ThCtx
ESS_STR_TAppName
ESS_STR_TDbName
ESS_PPDBINFO_T ppDbInfo

Parameters

hCtxEssbase API context handle.
AppNameApplication name.
DbNameDatabase name.
ppDbInfoAddress 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

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()