Creates a new object on the server or client object system.
Syntax
ESS_FUNC_M EssCreateObject (hCtx, ObjType, AppName, DbName, ObjName);
Parameter | Data Type | Description |
---|---|---|
hCtx | ESS_HCTX_T | API context handle. Can be local context handle returned by EssCreateLocalContext(). |
ObjType | ESS_OBJTYPE_T | Object type (must be single type). Refer to Bitmask Data Types (C) for a list of possible values. |
AppName | ESS_STR_T | Application name. |
DbName | ESS_STR_T | Database name. If NULL, uses the Application subdirectory. |
ObjName | ESS_STR_T | Name of object to create. See Object Name Limits. |
Notes
To create an object, it must not already exist.
A newly created object on the server contains no data and merely acts as a place holder to prevent another user from creating the object. If you wish to update the created object, you should lock it using EssLockObject(), then save it using EssPutObject().
Return Value
None.
Access
This function requires the caller to have Application or Database Design privilege (ESS_PRIV_APPDESIGN or ESS_PRIV_DBDESIGN) for the specified application or database to contain the object.
Example
ESS_FUNC_M ESS_CreateObject (ESS_HCTX_T hCtx) { ESS_FUNC_M sts = ESS_STS_NOERR; ESS_STR_T AppName; ESS_STR_T DbName; ESS_STR_T ObjName; ESS_OBJTYPE_T ObjType; AppName = "Sample"; DbName = "Basic"; ObjName = "Test"; ObjType = ESS_OBJTYPE_OUTLINE; sts = EssCreateObject(hCtx, ObjType, AppName, DbName, ObjName); if(!sts) printf("The Object is created.\r\n"); return (sts); }
See Also