Restituisce un valore booleano che indica se questo database è un database principale.
Un repository schema è un database principale per uno o più database utente. Durante la gestione del repository schema, è necessario utilizzare i metodi dell'oggetto AdminSession.
VBScript
Nel seguente esempio viene mostrato come accedere al database da un'applicazione Visual Basic.
set sessionObj = CreateObject("CLEARQUEST.SESSION") ' Login to each database successively. databases = sessionObj.GetAccessibleDatabases("MASTR","","") For Each db in databases If db.GetIsMaster Then ' Create an AdminSession object and logon to the schema ' repository. ' ... ElseIf 'Logon to the database using the regular Session object. ' ... End If Next
Perl
use CQPerlExt;
#Start a Rational ClearQuest session
$sessionObj = CQSession::Build();
#Get a list of accessible database description objects
$databases = $sessionObj->GetAccessibleDatabases("MASTR", "", "");
#Get the number of databases
$count = $databases->Count();
#Foreach accessible database that is the master database
for($x=0;$x<$count;$x++){
$db = $databases->Item($x);
if ( $db->GetIsMaster() ) {
#Create an AdminSession and logon to the schema repository
#...
}
else {
#Logon to the database using the regular Session object
#...
}
}
CQSession::Unbuild($sessionObj);