このデータベースがマスター データベースであるかどうかを示す Boolean を戻します。
スキーマ リポジトリは、1 つ以上のユーザー データベースのマスター データベースです。スキーマ リポジトリを操作する場合は、AdminSession オブジェクトのメソッドを使用する必要があります。
VBScript
以下の例は、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);