GetInstalledMasterDbs

Description

(Solo Perl) Per Visual Basic, consultare GetInstalledMasters.

Restituisce l'elenco di archivi di schemi registrati (database principali).

Il valore restituito รจ un riferimento a un vettore. I valori restituiti di GetInstalledDbSets e GetInstalledMasterDbs contengono sempre lo stesso numero di stringhe. Il contenuto di entrambi viene ordinato in modo che ciascun archivio di schemi (database principale) elencato in GetInstalledMasterDbs appartenga al gruppo di database nello stesso indice in GetInstalledDbSets.

Sintassi

Perl

$session->GetInstalledMasterDbs(); 
Identificativo
Description
session
L'oggetto Session che rappresenta la sessione di accesso al database corrente.
Valore di ritorno
Restituisce un riferimento a un vettore di stringhe per i gruppi di database principali.

Esempi

Perl

# This program runs in the context of a
# external program (not from within a hook)...

use CQPerlExt;

# Create the session object...
$Session = CQSession::Build()
or die "Couldn't create the ClearQuest 'session' object.\n";

# Get the list of master databases and dbsets installed on this
# machine; note that both functions return references to
# arrays...

my($MasterDBsREF) = $Session->GetInstalledMasterDbs();
my(@MasterDBs) = @$MasterDBsREF;
my($DbSetsREF) = $Session->GetInstalledDbSets();
my(@DbSets) = @$DbSetsREF;
my($N) = $#MasterDBs;

printf ("There are %d DbSet(s) installed on this machine.\n", ($N+1));

for (my($i)=0; $i <= $N; $i++) {
print "DbSet #" . $i . ": " .
" DbSet=" . $DbSets[$i] .
" MasterDB=" . $MasterDBs[$i] .
"\n";
}

CQSession::Unbuild($Session); 


Feedback