DatabaseName

Description

Sets or returns the physical name of the current database.

Setting the name changes the information Rational ClearQuest uses to connect to the physical database, not the actual database itself.

Note: Setting a new value does not take effect until the ApplyPropertyChanges method is called.

Syntax

VBScript

database.DatabaseName 
database.DatabaseName newDbName 

Perl

$database->GetDatabaseName(); 
$database->SetDatabaseName(newDbName); 
Identifier
Description
database
A Database object.
newDbName
A String containing the new physical name of the database, including any associated path information (for example, "C:\temp\NewDb.mdb").
Return value
A String containing the current physical name of the database, including any associated path information.

Examples

VBScript

set sessionObj = CreateObject("CLEARQUEST.SESSION") 



' Get the list of databases in the 

' MASTR database set.

databases = sessionObj.GetAccessibleDatabases("MASTR","admin","")

' Login to each database successively.

For Each db in databases 

   dbName = db.GetDatabaseName 

   sessionObj.UserLogon "admin", "", dbName, AD_PRIVATE_SESSION, "" 

' Access the database 

   ' ... 

Next 

Perl

use CQPerlExt;

#Start a Rational ClearQuest session

$sessionObj = CQSession::Build();

#Get a list of accessible databases

$databases = $sessionObj->GetAccessibleDatabases("MASTR", "admin", "");

$count = $databases->Count();



# Login to each database successively. 

for($x=0;$x<$count;$x++){

   $db = $databases->Item($x);

   $dbName = $db->GetDatabaseName();

   # Logon to the database 

   $sessionObj->UserLogon( "admin", "", $dbName, "" );

   #...

   }

CQSession::Unbuild($sessionObj); 


Commentaires en retour