Returns a Boolean indicating whether this database is a master database.
A schema repository is a master database for one or more user databases. When manipulating the schema repository, you should use the methods of the AdminSession object.
VBScript
The following example shows you how to log on to the database from a Visual Basic application.
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);