Returns the globalRuleId that uniquely identifies the specified global rule in an EDMdatabase. A global rule is defined in a dictionary model (Express schema) or in an EDMruleSchema. A global rule name is unique within the Express schema or the EDMruleSchema that defines the actual global rule.
The actual dictionary model that hold the global rule definition must be open before this operation can be successfully performed.
Related functions: edmiGetWhereRule
Header:
#include "sdai.h"
Prototype:
EdmiError edmiGetGlobalRule (SdaiInstance schemaId,
SdaiString globalRuleName,
SdaiGlobalRule *globalRuleId);
Arguments:
schemaId |
A schemaID that uniquely identifies the dictionary model (Express schema) that defines the actual global rule, or a ruleSchemaID that uniquely identifies the EDMruleSchema that defines the actual global rule. |
globalRuleName |
The name of the global rule of interest. Global rule names are case insensitive. A global rule name are unique within the Express schema or the EDMruleSchema that defines the actual global rule. |
globalRuleId |
Address of a variable that will receive the globalRuleId that uniquely identifies a global rule in an EDMdatabase. |
Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an EDMinterface error code. Use edmiGetErrorText to get the error text corresponding to the error code.
EXAMPLE
SdaiInstance schemaId;
EdmiError rstat;
SdaiGlobalRule globalRuleId;
. . .
if (rstat = edmiGetGlobalRule (schemaId,
"compatible_dimension",
&globalRuleId)) {
/* Error in operation */
printf("\nError: %s in edmiGetGlobalRule \n",
edmiGetErrorText(rstat));
goto error;
}
printf("\nGlobalRuleId: %lu", globalRuleId);
. . .