GetDbId

Description

Returns the Entity object's database ID number.

The return value is a database ID. This value is used internally by the database to keep track of records. Do not confuse this value with the defect ID number returned by GetDisplayName. DBIDs are unique to a class of records, and unique within the stateful records, and unique within the stateless records.

Note: In version 7.0.0.0 the limit on the number of records that can be stored increased so the range of DBIDs also increased. However, Rational® ClearQuest® clients earlier than version 7.0.0.0 cannot display records with database identifiers (DBIDs) higher than the former limit. For more information on DBIDs, see Mit Datensätzen arbeiten

Syntax

VBScript

entity.GetDbId 

Perl

$entity->GetDbId(); 
Identifier
Description
entity
An Entity object representing a user data record. Inside a hook, if you omit this part of the syntax, the Entity object corresponding to the current data record is assumed (VBScript only).
Return value
A Long containing the Entity object's database ID.

Examples

VBScript

set session = GetSession

set record1 = session.GetEntity("defect", "test00000001")

dbid = record1.Getdbid 

set record1 = session.GetEntityByDbId("defect", dbid) 

Perl

#Assume you have $entityObj, an Entity Object

$sessionObj = $entityObj->GetSession();

$dbid = $entityObj->GetDbId();

#...

#Later, to get the record again:
$entityObj = $sessionObj->GetEntityByDbId("defect",$dbid); 

Feedback