EssDeleteDatabase

Description

EssDeleteDatabase() deletes an existing database from an application, either on the client or the server. If the database is running on the server, then it is first stopped.

Syntax

ESS_FUNC_M EssDeleteDatabase (hCtx, AppName, DbName);
ESS_HCTX_ThCtx
ESS_STR_TAppName
ESS_STR_TDbName

Parameters

hCtxEssbase API context handle.
AppNameName of application containing database.
DbNameName of database to delete.

Return Value

None.

Notes

Access

For a server database, the caller must have database Create/Delete/Edit privilege (ESS_PRIV_DBCREATE).

Example

ESS_FUNC_M
ESS_DeleteDb (ESS_HCTX_T   hCtx)
{
   ESS_FUNC_M     sts = ESS_STS_NOERR;
   ESS_STR_T     AppName;
   ESS_STR_T     DbName;
   AppName = "Sample";
   DbName  = "Basic";
   
   /* IF the current active is the same as the 
    * unload db, ClearActive first */
        sts = EssClearActive(hCtx);

   /* ELSE */
        sts = EssDeleteDatabase(hCtx, AppName,
              DbName);
   return (sts);
}

See Also

EssDeleteApplication()
EssDeleteObject()