Returns the name of the database set of which this database is a member.
You can use this method to get the database set name of this database. You can pass this name to the Session object's GetAccessibleDatabases method to get a list of the user databases in the database set.
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 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", "", "");
#Obtenez le nombre de bases de données
$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);