Copies an existing application, either on the client or the server, to a new application, including all associated databases and objects.
Syntax
ESS_FUNC_M EssCopyApplication (hCtx, hSrcCtx, SrcApp, DestApp);
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 | Name of existing application to copy. |
DestApp | ESS_STR_T | Name of new application. See Application Name Limits. |
Notes
Copying a client application copies the local application directory and contents.
This function can only be used to copy a client application to a new application on the client, or a server application to a new application on the same server. Use EssCopyObject() to copy an application between different servers.
The new application is not started. Call EssLoadApplication to start the newly copied application.
Return Value
None.
Access
For a server application, the caller must have Application Create/Delete/Edit privilege (ESS_PRIV_APPCREATE), and application designer privilege on the source application to be copied (ESS_PRIV_APPDESIGN).
Example
ESS_FUNC_M ESS_CopyApp(ESS_HCTX_T hCtx) { ESS_FUNC_M sts = ESS_STS_NOERR; ESS_HCTX_T hSrcCtx; ESS_STR_T SrcApp; ESS_STR_T DestApp; hSrcCtx = hCtx; SrcApp = "Sample"; DestApp = "NewSamp"; sts = EssCopyApplication(hCtx, hSrcCtx, SrcApp, DestApp); return (sts); }
See Also