AllSubscribedDatabases
Description
Returns the collection of databases to which the group has access. This list of databases includes indirect subscriptions that may exist through group membership and group subscriptions (that is, databases to which the group is not explicitly subscribed).
This is a read-only property; it can be viewed but not set.
Each element in the returned collection is a Database object. If this returns an empty collection or the collection has zero elements, the group is subscribed to all databases.
Syntax
VBScript
group.AllSubscribedDatabases
Perl
$group->GetAllSubscribedDatabases
();
- Identifier
- Description
- group
- A Group object.
- Return value
- A Databases collection object containing the databases to which the user has access, not just the ones to which the user is subscribed.
Examples
VBScript
Set session = CreateObject("CLEARQUEST.ADMINSESSION")
session.Logon "admin", "", "bigboss"
set group = session.GetGroup("groupnum1")
Set dbs = group.SubscribedDatabases
Set alldbs = group.AllSubscribedDatabases
alldbscount = alldbs.Count
dbscount = dbs.Count
msgbox "alldbs count is " & CSTR(alldbscount)
msgbox "dbs count is " & CSTR(dbscount)
Perl
use CQPerlExt;
$adminsession = CQAdminSession::Build();
$adminsession->Logon("admin", "", "2003.06.00");
if (defined($adminsession->Logon("admin", "", "2003.06.00"))) {
print "Error: Not logged into HCL Compass.. please log in \n";
}
$userObj = $adminsession->GetUser("admin");
$dblist = $userObj->GetAllSubscribedDatabases();
$numdbs = $dblist->Count();
print $numdbs;
CQAdminSession::Unbuild($adminsession);