Sets the caller's active application and database.
Syntax
ESS_FUNC_M EssSetActive (hCtx, AppName, DbName, pAccess);
Parameter | Data Type | Description |
---|---|---|
hCtx | ESS_HCTX_T | API context handle. |
AppName | ESS_STR_T | Application name. |
DbName | ESS_STR_T | Database name. |
pAccess | ESS_PACCESS_T | Address of variable to receive the user's access level to the selected database. See Bitmask Data Types (C) for a list of possible values for this field. |
Notes
If the application and database have not been loaded, this function will load them.
The EssAutoLogin() function can also be used to allow a user to login and set the active application and database.
Return Value
If successful, returns the user's access level to the selected application and database in pAccess.
Access
This function requires no special privileges.
Example
ESS_FUNC_M ESS_SetActive (ESS_HCTX_T hCtx) { ESS_FUNC_M sts = ESS_STS_NOERR; ESS_ACCESS_T Access; ESS_STR_T AppName; ESS_STR_T DbName; AppName = "Sample"; DbName = "Basic"; sts = EssSetActive (hCtx, AppName, DbName, &Access); return (sts); }
See Also