EssCreateDatabase

Description

EssCreateDatabase() creates a new database within an application, either on the client or the server. If the database is created on the server, it is also started.

Syntax

ESS_FUNC_M EssCreateDatabase (hCtx, AppName, DbName, DbType);
ESS_HCTX_ThCtx
ESS_STR_TAppName
ESS_STR_TDbName
ESS_USHORT_TDbType

Parameters

hCtxEssbase API context handle.
AppNameName of application to contain database.
DbNameName of database to create. Database names can be 8 characters long, and can contain all special characters allowed in DOS file names. No spaces, commas, tabs, slashes, backslashes, or periods are allowed. The use of some special characters is not recommended because they are often used by the operating system (for example, @, $, %, and &).
DbTypeType of database to create. Can be ESS_DBTYPE_NORMAL, or ESS_DBTYPE_CURRENCY

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_CreateDb (ESS_HCTX_T  hCtx)
{
   ESS_FUNC_M        sts = ESS_STS_NOERR;
   ESS_STR_T        AppName;
   ESS_STR_T        DbName;
   
   AppName = "Sample";
   DbName  = "Basic";
   
   sts = EssCreateDatabase(hCtx, AppName, DbName, ESS_DBTYPE_NORMAL);
   return (sts);
}

See Also

EssCreateApplication()
EssCreateObject()