Returns the numeric schemaID that uniquely identifies the schema definition of the specified Express Schema in the remote EDMdatabase.
EXPRESS:
ENTITY schema_definition;
name : STRING;
entities : SET OF entity_definition;
types : SET OF defined_type;
global_rules : SET OF global_rule;
user_constants : SET OF user_constant;
user_functions : SET OF user_function;
user_procedures : SET OF user_procedure;
interface_declarations : LIST OF use_and_reference_from;
redeclared_attributes : OPTIONAL SET OF attribute;
used_built_in_functions : OPTIONAL SET OF INTEGER;
rule_schemata : OPTIONAL SET OF rule_schema;
query_schemata : OPTIONAL SET OF query_schema;
short_form_schemata : OPTIONAL SET OF STRING;
schema_not_debugable : OPTIONAL BOOLEAN;
END_ENTITY;
Header:
#include "sdai.h"
Prototype:
EdmiError edmiRemoteGetSchema(SdaiServerContext serverContextId,
SdaiString schemaName,
SdaiSchema *schemaId,
SdaiInvocationId *edmiInvocationId);
Arguments:
serverContextId |
Context identification, from edmiDefineServerContext |
schemaName |
The name of the Express Schema for which to retrieve its id. Schema names are case insensitive and unique within an _EDMdatabase{_}. |
schemaId |
A variable that will receive the numeric schemaID that uniquely identifies the schema definition instance that corresponds to the given Express Schema in the remote EDMdatabase. |
edmiInvocationId |
Currently not used. |
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:
EdmiError rstat;
SdaiInteger nWrn, nErr;
SdaiServerContext myContext;
SdaiSchema schemaId;
/* Define Remote Server Context */
rstat = edmiDefineServerContext("MyRemoteServerContext",
"Johnny", "Supervisor", "cf37ftr",
"TCP", "9090", "MyServerHost",
NULL, NULL, NULL, NULL, NULL, &myContext);
/* Compile schema */
rstat = edmiRemoteDefineSchema(myContext, EXPRESS_SCHEMA_TYPE,
"c:/data/MyFile.exp", "c:/tmp/MyFile.dia", "MySchema",
DELETING_EXISTING_SCHEMAS | STORING_SOURCE,
&nWrn, &nErr, NULL);
/* Get the id of schema MySchema */
rstat = edmiRemoteGetSchema(myContext, "MySchema",
&schemaId, NULL);
/* Get the HTML source
of schema MySchema */
rstat = edmiRemoteGetSchemaSource(myContext, EXPRESS_SCHEMA_TYPE,
"MySchema", NULL, SHOW_HTML,
"c:/out/MySchema.html", NULL);
. . .