Copies an existing filter.
Syntax
ESS_FUNC_M EssCopyFilter (hCtx, hSrcCtx, SrcApp, DestApp, SrcDb, DestDb, SrcName, DestName);
Parameter | Data Type | Description |
---|---|---|
hCtx | ESS_HCTX_T | API context handle. |
hSrcCtx | ESS_HCTX_T | Not used—should be same as hCtx. |
SrcApp | ESS_STR_T | Source application name. |
DestApp | ESS_STR_T | Destination application name. |
SrcDb | ESS_STR_T | Source databasename. |
DestDb | ESS_STR_T | Destination database name. |
SrcName | ESS_STR_T | Source name of existing filter to be copied. |
DestName | ESS_STR_T | Destination name of copied filter. See Filter Name Limits. |
Notes
The source filter must already exist.
To prevent overwriting an existing filter by mistake, the caller should check whether the destination filter already exists.
Return Value
None.
Access
This function requires the caller to have database design privilege (ESS_PRIV_DBDESIGN) for the specified database.
Example
ESS_FUNC_M ESS_CopyFilter (ESS_HCTX_T hCtx) { ESS_FUNC_M sts = ESS_STS_NOERR; ESS_HCTX_T hSrcCtx; ESS_STR_T SrcApp; ESS_STR_T DestApp; ESS_STR_T SrcDb; ESS_STR_T DestDb; ESS_STR_T SrcName; ESS_STR_T DestName; hSrcCtx = hCtx; SrcApp = "Sample"; SrcDb = "Basic"; SrcName = "OldFilter"; DestApp = "Sample"; DestDb = "Basic"; DestName = "NewFilter"; sts = EssCopyFilter(hCtx, hSrcCtx, SrcApp, DestApp, SrcDb, DestDb, SrcName, DestName); if(!sts) printf("The Filter is copied.\r\n"); return (sts); }
See Also