Sets user-configurable parameters for the database using the database's state structure.
Syntax
ESS_FUNC_M EssSetDatabaseState (hCtx, AppName, DbName, pDbState);
| Parameter | Data Type | Description |
|---|---|---|
hCtx | ESS_HCTX_T | API context handle |
AppName | ESS_STR_T | Application name |
DbName | ESS_STR_T | Database name |
pDbState | ESS_DBSTATE_T | Pointer to database state structure |
Notes
EssGetDatabaseState() should be called to initialize the ESS_DBSTATE_T structure before EssSetDatabaseState() is called.
This function can only set user-configurable parameters for server databases.
Return Value
None.
Access
This function requires the caller to have database designer privilege (ESS_PRIV_DBDESIGN) for the specified database.
Example
ESS_FUNC_M
ESS_SetDbState (ESS_HCTX_T hCtx,
ESS_HINST_T hInst
)
{
ESS_FUNC_M sts = ESS_STS_NOERR;
ESS_PDBSTATE_T DbState;
ESS_STR_T AppName;
ESS_STR_T DbName;
AppName = "Sample";
DbName = "Basic";
sts = EssGetDatabaseState (hCtx, AppName,
DbName, &DbState);
if (!sts)
{
if (DbState)
{
/****************************
* Update DbState structure *
****************************/
sts = EssSetDatabaseState (hCtx, AppName,
DbName, DbState);
EssFree (hInst, DbState);
}
}
return (sts);
}See Also