EssLogin() logs a user in to an Essbase Server. This function should normally be called after executing a successful call to EssInit(), and prior to making any other API calls which require a context handle argument.
ESS_FUNC_M EssLogin (hInstance, Server, UserName, Password, pDbCount, ppDbList, phCtx);
| ESS_HINST_T | hInstance |
| ESS_STR_T | Server |
| ESS_STR_T | UserName |
| ESS_STR_T | Password |
| ESS_PUSHORT_T | pDbCount |
| ESS_PPAPPDB_T | ppDbList |
| ESS_PHCTX_T | phCtx |
| hInstance | API instance handle. |
| Server | Network server name string. |
| UserName | User name string. |
| Password | Password string. |
| pDbCount | Address of variable to receive count of accessible applications/databases. |
| ppDbList | Address of pointer to receive allocated array of application/databasename structures. |
| phCtx | Pointer to an Essbase Server context handle. |
If successful, returns an Essbase Server context handle in phCtx, which can be used as an argument in subsequent calls to other API functions. Also returns a count of databases accessible to the specified user in pCount, and a list of accessible applications and databases in ppDbList.
Before calling this function, you must first initialize the API and obtain a valid instance handle by calling EssInit().
ESS_FUNC_M
ESS_Login (ESS_HINST_T hInst)
{
ESS_FUNC_M sts = ESS_STS_NOERR;
ESS_HCTX_T hCtx;
ESS_USHORT_T Items;
ESS_USHORT_T ind;
ESS_PAPPDB_T pAppsDbs = NULL;
ESS_STR_T SvrName;
ESS_STR_T User;
ESS_STR_T Password;
SvrName = "POPLAR";
User = "Joseph";
Password = "Password";
sts = EssLogin (hInst, SvrName, User, Password,
&Items, &pAppsDbs, &hCtx);
if (!sts)
{
for (ind = 0; ind < Items; ind++)
{
if ((pAppsDbs+ind) != NULL)
{
if ((pAppsDbs[ind].AppName != NULL) &&
(pAppsDbs[ind].DbName != NULL))
{
printf ("%s\r\n", pAppsDbs[ind].AppName);
printf ("%s\r\n", pAppsDbs[ind].DbName);
}
}
}
}
return(sts);
}
EssAutoLogin()
EssLoginAs()
EssLoginEx()
EssLoginExAs()
EssInit()
EssListDatabases
EssLogout()
EssSetActive()