Lists all currency databases within a specific application which are accessible to the caller.
Syntax
ESS_FUNC_M EssListCurrencyDatabases (hCtx, AppName, pCount, ppDbList);
Parameter | Data Type | Description |
---|---|---|
hCtx | ESS_HCTX_T | API context handle |
AppName | ESS_STR_T | Application name |
pCount | ESS_PUSHORT_T | Address of variable to receive count of currency databases |
ppDbList | ESS_APPDB_T | Address of pointer to receive allocated array of application/databasename structures |
Notes
This function can only be used to list currency databases within an application on the server, not the client.
The ppDbList argument returns an array of structures containing matching pairs of application and database name strings.
The memory allocated for ppDbList should be freed using EssFree().
Return Value
If successful, this function returns a count of the number of accessible currency databases in pCount, and a list of applications/currency database names in ppDbList.
Access
This function requires no special privileges; note however that server currency databases will only be listed if the caller has access to them.
Example
ESS_FUNC_M ESS_ListCurrencyDatabases (ESS_HCTX_T hCtx, ESS_HINST_T hInst) { ESS_FUNC_M sts = ESS_STS_NOERR; ESS_USHORT_T Items; ESS_USHORT_T ind; ESS_STR_T AppName; ESS_PAPPDB_T pDbsList = NULL; AppName = "Sample"; sts = EssListCurrencyDatabases(hCtx, AppName, &Items, &pDbsList); if(!sts) { if(Items && pDbsList) { printf("\r\n---- Currency Databases ----\r\n\r\n"); for (ind = 0; ind<Items; ind++) { if((pDbsList+ind) !=NULL) { if(pDbsList[ind].DbName != NULL) { printf("%s",AppName); printf(" ==> "); printf("%s",pDbsList[ind].DbName); printf("\n\r"); } } } EssFree(hInst, pDbsList); } else printf("\r\nCurrency Database List is Empty\r\n\r\n"); } return (sts); }
See Also