edmiRemoteChangeOpenMode
EdmiError edmiRemoteChangeOpenMode(SdaiServerContext serverContextId, SdaiInstance currInst, SdaiAccessMode openMode, SdaiInvocationId *edmiInvocationId);
Changes the open mode of a model or a repository within a locally connected EDMdatabase . This feature has been implemented to provide all EDMInterface functionality through the remote EDMInterface calls. Only applicable for the LOCAL_CONTEXT communication type.
Arguments
Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_a_serverContextId'.
Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_a_currInst_EDMI'.
Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_a_openMode'.
Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_a_edmiInvocationId'.
Return Value
Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.
Options
Example
EdmiError rstat; SdaiServerContext myLocalContext; SdaiModel modId; SdaiInteger index, nHits; SdaiInstance johnnysId; /* Define Remote Server Context */ rstat = edmiDefineServerContext("MyLocalContext", NULL, NULL, NULL, "LOCAL_CONTEXT", NULL, NULL, NULL, NULL, NULL, NULL, NULL, &myLocalContext); /* Get the modelId of MyModel */ rstat = edmiRemoteGetModelBN(myLocalContext, "DataRepository", "MyModel", &modId, NULL); /* Find Johnnys Id (Unique PID = 4572314) */ rstat = edmiRemoteFindInstancesBN(myLocalContext, modId, "Person", "PID = 4572314", sizeof(SdaiInstance), &index, &nHits, &johnnysId, NULL); /* If Johnny has a cellular phone, then confiscate it */ { SdaiString _attrName = "CELLULAR"; SdaiBoolean *_isSet; SdaiAccessMode _openMode; rstat = edmiRemoteTestAttrsBN(myLocalContext, johnnysId, 0, 1, &_attrName, &_isSet, NULL); if (*_isSet) { /* Get current open mode for MyMoodel */ rstat = edmiRemoteGetOpenModeBN(myLocalContext, "MyRepository", "MyModel", &_openMode, NULL); if (_openMode != sdaiRW) { /* Set write access to the model */ rstat = edmiRemoteChangeOpenMode(myLocalContext, modId, sdaiRW, NULL); } /* Confiscate the cellular */ rstat = edmiStartModelWriteTransaction(modId); rstat = edmiRemoteUnsetAttrsBN(myLocalContext, johnnysId, 1, &_attrName, NULL); rstat = edmiCommitAllTransactions(); /* Reset the initial open mode on the model */ if (_openMode != sdaiRW) { rstat = edmiRemoteChangeOpenModeBN(myLocalContext, "MyRepository", "MyModel", _openMode, NULL); } } } . . .
See also
Filter by label
There are no items with the selected labels at this time.