GetWorkSpace

설명

세션의 Workspace 오브젝트를 리턴합니다.

Workspace 오브젝트를 사용하여 저장된 조회, 차트 및 보고서를 Rational ClearQuest 작업공간에서 조작할 수 있습니다.

구문

VBScript

session.GetWorkSpace 

Perl

$session->GetWorkSpace(); 
ID
설명
session
현재 database-access 세션을 나타내는 Session 오브젝트입니다.
Return value
현재 세션에 속한 Workspace 오브젝트입니다.

예제

VBScript

set sessionObj = GetSession 

' Get the workspace for manipulating query, chart, and report info.
set wkSpc = sessionObj.GetWorkSpace 

Perl

#Get a Rational ClearQuest session

$sessionObj = $entity->GetSession();



#Get the workspace for manipulating query, chart, and report 

$MyWorkSpace = $sessionObj->GetWorkSpace();



#Get a list of queries in the workspace...

$MyQueriesListREF = $MyWorkSpace->GetAllQueriesList();

foreach (@$MyQueriesListREF) {

  print ("$_\n");

}

#The QueryDef object contains information about a workspace

#query, including the query name and the SQL string used

#to execute the query.

foreach $QueryName (@$MyQueriesListREF) {

  # Get the QueryDef associated with that query...

  $QueryDef = $MyWorkSpace->GetQueryDef($QueryName);

  # Build the ResultSet object to hold the results of

  # the query...

  $ResultSet = $Session->BuildResultSet($QueryDef);

  # Execute the query...

  $ResultSet->Execute();

  # Get the query's short name (without the pathname)...

  @QueryPath = split('/', $QueryName);

  $QueryShortName = @QueryPath[$#QueryPath];

  # Process/display the results of the query...

  print "\n" if ($PrintDetails);

  print "$QueryShortName:  ";

  for ($N = 0; (($ResultSet->MoveNext()) ==

  $CQPerlExt::CQ_SUCCESS); $N++) {

    if ($PrintDetails) {

      printresultrow();

    }

  }

  print "$N\n";

} 

피드백