Copies an alias table to another alias table.
Syntax
ESS_FUNC_M EssOtlCopyAliasTable (hOutline, pszSourceAliasTable, pszDestAliasTable, fMerge);
Parameter | Data Type | Description |
---|---|---|
hOutline | ESS_HOUTLINE_T | Outline context handle. |
pszSourceAliasTable | ESS_STR_T | Name of alias table to copy from. If this parameter is ESS_NULL, the default alias table is used. |
pszDestAliasTable | ESS_STR_T | Name of alias table to copy to. Cannot be the same as pszSourceAliasTable. |
fMerge | ESS_BOOL_T | Set to ESS_TRUE to merge the source file into the existing destination alias table. Set to ESS_FALSE to clear the destination alias table before copying. |
Notes
If the destination alias table does not exist, it is created. If the destination alias table exists, it is cleared first, unless the fMerge flag is set to ESS_TRUE.
The maximum number of alias tables in a single block storage or aggregate storage database outline (including the default table) is 32.
When copying an alias table, language codes associated with the alias table are removed from the copied alias table.
Return Value
Returns 0 if successful; otherwise one of the following:
OTLAPI_BAD_ALIASTABLE
OTLAPI_ERR_MAXALIASTABLES
OTLAPI_ERR_ALIASTABLENAME
OTLAPI_ERR_COPYALIASTABLE: Source and destination tables are the same.
Example
#include <essapi.h> #include <essotl.h> ESS_STS_T sts = 0; ESS_HOUTLINE_T hOutline; ESS_OBJDEF_T Object; ESS_APPNAME_T szAppName; ESS_DBNAME_T szDbName; ESS_OBJNAME_T szFileName; memset(&Object, '\0', sizeof(Object)); Object.hCtx = hCtx; Object.ObjType = ESS_OBJTYPE_OUTLINE; strcpy(szAppName, "Sample"); strcpy(szDbName, "Basic"); strcpy(szFileName, "Basic"); Object.AppName = szAppName; Object.DbName = szDbName; Object.FileName = szFileName; sts = EssOtlOpenOutline(hCtx, &Object, ESS_TRUE, ESS_TRUE, &hOutline); if (!sts) { sts = EssOtlCopyAliasTable(hOutline, ESS_NULL, "Alias Table 2", ESS_TRUE); }
See Also