EssGDisconnect() disconnects a grid from a database at the server.
ESSG_FUNC_M EssGDisconnect (hGrid, ulOptions);
| ESSG_HGRID_T | hGrid |
| ESSG_ULONG_T | ulOptions |
| hGrid | Handle passed back from EssGNewGrid. |
| ulOptions | Reserved for future use. Should be set to zero. |
If successful, returns ESSG_STS_NOERR.
#include <essapin.h>
#include <essgapin.h>
ESSG_FUNC_M sts = ESS_STS_NOERR;
ESSG_ULONG_T ulOptions = 0;
ESSG_INIT_T InitStruct;
ESSG_HANDLE_T Handle;
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);
/* connects the grid to a database on the server */
if(!sts)
sts = EssGConnect(hGrid, "Rainbow", "Admin",
"Password", "Demo", "Basic",
ESSG_CONNECT_DEFAULT);
/* disconnects a grid from database at server */
if(!sts)
sts = EssGDisconnect(hGrid, ulOptions);
/* terminate the EGAPI */
if(!sts)
sts = EssGTerm(Handle);
}