IRdsImportSchema.CheckTable

Syntax

CheckTable(Database: IDatabaseInstance): Boolean;

Parameters

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

Description

The CheckTable method checks if the table specified in import 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. It is also necessary to create an import scheme with the IMPORTSCHEMA identifier in the dictionary.

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

Sub  UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Dict: IRdsDictionary;
    ImportSchemas: IRdsImportSchemas;
    ImportSchema: IRdsImportSchema;
    Database: IDatabaseInstance;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemByIdNamespace("NSI_SEP",  MB.GetObjectKeyById("NSI")).Bind; Dict := MObj As  IRdsDictionary;
    ImportSchemas := Dict.ImportSchemas;
    ImportSchema := ImportSchemas.FindById("IMPORTSCHEMA");
    Debug.WriteLine(ImportSchema.CheckTable(Database)? "Table exists" : "Table not found");
End  Sub  UserProc;

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

See also:

Rds Assembly Interfaces