GetEnabledPackageRevs
Description
Returns the PackageRev set that is enabled in the current revision of the schema.
When you call this method from the Session object, the schema revision is already known when you log onto the user database.
See this method, GetEnabledPackageRevs, in its other object, SchemaRev Object, for an alternative use.
Syntax
VBScript
session.GetEnabledPackageRevs
Perl
$session->GetEnabledPackageRevs();
- Identifier
- Description
- session
- The Session object that represents the current database-access session.
- Return value
- The PackageRevs collection object containing the PackageRev set.
Examples
VBScript
Set sessionObj = CreateObject("CLEARQUEST.SESSION")
sessionObj.UserLogon "admin", "", "SAMPL", AD_PRIVATE_SESSION, ""
Set packages = sessionObj.GetEnabledPackageRevs
For each pack in packages
a = pack.PackageName()
b = pack.RevString()
MsgBox (a)
MsgBox (b)
Next
Perl
use CQPerlExt;
#Start a session
$Session = CQSession::Build();
$Session->UserLogon("admin","","SAMPL","");
$packages = $Session->GetEnabledPackageRevs();
for($x=0;$x<$packages->Count();$x++){
$pack = $packages->Item($x);
$a = $pack->GetPackageName();
$b = $pack->GetRevString();
print "$a $b\n";
$edefs = $Session->GetEnabledEntityDefs($a,$b);
}
CQSession::Unbuild($Session);