xpfCreateModel

FUNCTION xpfCreateModel (repositoryId : GENERIC;
                         modelName    : STRING;
                         schemaId     : GENERIC; 
                         options      : INTEGER) 
                         modelId      : GENERIC;
                

The xpfCreateModel function creates a new model in the specified repository in the EDMdatabase, and returns the modelID in the argument <modelId>. A model is a logical container for entity instances defined by one Express schema. This schema will be the underlying schema of the new model and this particular schema must exist as a dictionary model in the EDMdatabase before this function can be successfully performed. Only data models can be created by this function. Any number of models of the same Express schema can exist in an EDMdatabase. The new model will be closed after creation, hence one of the functions xpxOpenModel or xpxOpenModelBN must be performed on the model before any access to it is permitted. A numeric modelID that uniquely identifies the created model in the EDMdatabase is returned. This modelID should be used in subsequent EDMinterface operations to identify the actual model. The model name qualified with the related repository name will also uniquely identify a model in an EDMdatabase. The executing EDMuser will be the owner of the new model and the current EDMgroup account of the executing EDMuser will be the owner group of the model. The owner and owner group of a model is relevant for access rights to the model in subsequent xpxOpenModel and xpxOpenModelBN operations. The model protection will be set according to the default model protection of the executing EDMuser. The repository that will hold the new model must be open before this function can be successfully performed.

See a Note to xpfCreateModelBN "do not forget to use the following options: XPXPERSISTENT_INSTANCES_HASH_TABLE, XPXM_INSTANCE_REFERENCES, XPXM_PACKED_MODEL, XPXM_INSTANCE_REFS_MUST_BE_DELETED in creating a model with the function"

Arguments


TypeNameComment
GENERICrepositoryIdRepository ID
STRINGmodelNameModel Name
GENERICschemaIdSchema ID
INTEGERoptions

The following encoding options are available:
XPXCHAR_ENCODING_UTF-8
XPXCHAR_ENCODING_UTF-16
XPXCHAR_ENCODING_ISO-10646-UCS-2
XPXCHAR_ENCODING_ISO-10646-UCS-4
XPXCHAR_ENCODING_ISO-LATIN-1
XPXCHAR_ENCODING_ISO-LATIN-2
XPXCHAR_ENCODING_ISO-8859-3
XPXCHAR_ENCODING_ISO-8859-4
XPXCHAR_ENCODING_ISO-8859-5
XPXCHAR_ENCODING_ISO-8859-6
XPXCHAR_ENCODING_ISO-8859-7
XPXCHAR_ENCODING_ISO-8859-8
XPXCHAR_ENCODING_ISO-8859-9
XPXCHAR_ENCODING_ISO-2022-JP
XPXCHAR_ENCODING_SHIFT_JIS
XPXCHAR_ENCODING_EUC-JP

Return Value



TypeNameComment
GENERICmodelIdModel ID

Options


OptionComment
XPXSOMEOPTIONcomment


Example


<Missing Example>


See also

Filter by label

There are no items with the selected labels at this time.