IRdsExportSchema.CheckTable

Syntax

CheckTable(Database: IDatabaseInstance): Boolean;

Parameters

Database. Database checked for availability of the table specified in the import scheme.

Description

The CheckTable method checks if the table specified in export scheme of the MDM dictionary, does really exist.

Comments

The method returns True if the table specified in the import scheme does really exist.

Example

Executing the example requires an MDM repository with the NSI identifier and an MDM dictionary with the NSI_DICT identifier in the repository. Create an export scheme with the EXPORTSCHEMA identifier in the dictionary.

Add links to the Metabase, Rds, Db system assemblies.

Sub  UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Dict: IRdsDictionary;
    ExportSchemas: IRdsExportSchemas;
    ExportSchema: IRdsExportSchema;
    Database: IDatabaseInstance;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemByIdNamespace("NSI_SEP",  MB.GetObjectKeyById("NSI")).Bind; Dict := MObj As  IRdsDictionary;
    ExportSchemas := Dict.ExportSchemas;
    ExportSchema := ExportSchemas.FindById("EXPORTSCHEMA");
    Debug.WriteLine(ExportSchema.CheckTable(Database)? "Table exists" : "Table not found");
End  Sub  UserProc;

After executing the example the table specified in the export scheme is checked for existence, and checking results are output to the console.

See also:

Rds Assembly Interfaces