このデータベースがメンバとなっているデータベース セット の名前を戻します。
このメソッドを使用すると、このデータベースのデータベース セット名を取得できます。この名前を Session オブジェクトの GetAccessibleDatabases メソッドに渡して、データベース セット内のユーザー データベースのリストを取得します。
VBScript
以下の例は、Visual Basic アプリケーションからデータベースにログオンする方法を示します。
set sessionObj = CreateObject("CLEARQUEST.SESSION") ' Login to each database successively. databases = sessionObj.GetAccessibleDatabases("MASTR","","") For Each db in databases If Not db.GetIsMaster Then dbSetName = db.GetDatabaseSetName dbName = db.GetDatabaseName ' Logon to the database sessionObj.UserLogon "tom", "gh36ak3", dbName, AD_PRIVATE_SESSION, dbSetName 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 not the master database, login as
#user "tom" with password "gh36ak3"
for($x=0;$x<$count;$x++){
$db = $databases->Item($x);
if (! $db->GetIsMaster() ) {
#Get the database set of which this database is a member
$dbSetName = $db->GetDatabaseSetName();
#Get the database name from the description object
$dbName = $db->GetDatabaseName();
# Logon to the database
$sessionObj->UserLogon( "tom", "gh36ak3", $dbName, $dbSetName );
}
#...
}
CQSession::Unbuild($sessionObj);