Loading ...
Sorry, an error occurred while loading the content.

Reading from another CQ Db

Expand Messages
  • sid69se <sid69se@yahoo.se>
    I m connecting to another CQ Db and searching for a defect to read. I m not getting a hit on a record I know exists, any ideas ? The error message I get says
    Message 1 of 2 , Dec 16, 2002
    • 0 Attachment
      I'm connecting to another CQ Db and searching for a defect to read.
      I'm not getting a hit on a record I know exists, any ideas ?
      The error message I get says that the result string ($CqTrTitle)is
      empty.

      Here's the code.
      ************************************
      $debug = 1;

      # Start a ClearQuest session
      $AdminSession= CQPerlExt::CQAdminSession_Build();
      $SessionObj = CQPerlExt::CQSession_Build();

      # Logon to the database
      $SessionObj->UserLogon( "admin", "admin", "atest", "REPOS" );

      $queryDefObj = $SessionObj->BuildQuery("defect");
      $queryDefObj->BuildField("Title");

      $id[0] = "A112233";

      my $operator = $queryDefObj->BuildFilterOperator
      ($CQPerlExt::CQ_BOOL_OP_AND);
      $operator->BuildFilter("TRID",$CQPerlExt::CQ_COMP_OP_EQ, \@id);

      $rsltSetObj = $SessionObj->BuildResultSet($queryDefObj);
      $rsltSetObj->Execute;

      while ($rsltSetObj->MoveNext() == $CQPerlExt::CQ_SUCCESS) {
      my $CqTrTitle = $rsltSetObj->GetColumnValue(1);
      }

      $session->OutputDebugMessage("Title for A112233 = $CqTrTitle \r\n")
      if $debug;
      ************************************************

      Regs Sid
    • sid69se <sid69se@yahoo.se>
      Sorry wrong forum Regs Sid
      Message 2 of 2 , Dec 16, 2002
      • 0 Attachment
        Sorry wrong forum

        Regs Sid
      Your message has been successfully submitted and would be delivered to recipients shortly.