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);
Parameter | Data Type | Description |
---|---|---|
hCtx | ESS_HCTX_T | API context handle. |
AppName | ESS_STR_T | Name of application containing database. |
DbName | ESS_STR_T | Name of database to delete. |
Notes
Deleting a client database removes the local database directory and contents.
Deleting a server database removes all objects associated with that database.
Return Value
None.
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