Database: IDatabase;
Database: Prognoz.Platform.Interop.Db.IDatabase;
The Database property determines a database that stores dictionary data.
The property returns Null for MDM dictionaries; the database can be obtained in the IRdsDatabase.Database property.
For the table MDM dictionaries that have been created in the MDM repository, the Database property corresponds to the IRdsDatabase.Database property.
For the table MDM dictionaries that have been created in a custom repository folder, the property may be used to specify the database, in which a table will be created, and dictionary data will be stored. By default, when a table MDM dictionary is created, a database is used that is set for the repository as a default database.
Executing the example requires that the repository contains a table MDM dictionary with the RDS_D identifier.
Add links to the Db, Metabase, Rds system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Dict: IRdsDictionary;
Begin
// Get current repository
MB := MetabaseClass.Active;
// Get table dictionary
MObj := MB.ItemById("RDS_D").Bind;
Dict := MObj As IRdsDictionary;
// Display database driver identifier
Debug.WriteLine(Dict.Database.DriverId);
End Sub UserProc;
After executing the example the console window displays the database driver identifier.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example.
Imports Prognoz.Platform.Interop.Db;
Imports Prognoz.Platform.Interop.Rds;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
MObj: IMetabaseObject;
Dict: IRdsDictionary;
Begin
// Get current repository
MB := Params.Metabase;
// Get table dictionary
MObj := MB.ItemById["RDS_D"].Bind();
Dict := MObj As IRdsDictionary;
// Display database driver identifier
System.Diagnostics.Debug.WriteLine(Dict.Database.DriverId);
End Sub;
See also: