Connects a grid to an Essbase database, and changes the user password.
Syntax
| Parameter | Data Type | Description |
|---|---|---|
hGrid; | ESSG_HGRID_T | Handle from EssGNewGrid() |
Server; | ESSG_SERVER_T | Name of a valid server |
Username; | ESSG_USERNAME_T | Name of a valid user on the server |
Password; | ESSG_PASSWORD_T | User's password |
NewPassword; | ESSG_PASSWORD_T | User's new password |
Return Value
If successful, returns ESSG_STS_NOERR.
Example
#include
#include
{
ESSG_FUNC_M sts = ESS_STS_NOERR;
ESSG_INIT_T InitStruct;
ESSG_HANDLE_T Handle;
ESSG_SERVER_T Server;
ESSG_USERNAME_T UserName;
ESSG_PASSWORD_T Password;
ESSG_PASSWORD_T NewPassword;
ESSG_HGRID_T hGrid;
InitStruct.ulVersion = ESSG_VERSION;
InitStruct.ulMaxRows = 1000;
InitStruct.ulMaxColumns = 200;
InitStruct.pfnMessageFunc = ESS_NULL;
InitStruct.pUserdata = ESS_NULL;
/* initializes EGAPI */
sts = EssGInit(&InitStruct, Handle);
/* initializes a specific grid */
if(!sts)
sts = EssGNewGrid(Handle, &hGrid);
strcpy(Server, "Rainbow");
strcpy(UserName, "Admin");
strcpy(Password, "Password");
strcpy(Password, "NewPassword");
/* connects the grid to a database on the server */
if(!sts)
sts = EssGLoginSetPass(hGrid, Server, UserName, Password, NewPassword);
}See Also