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. Les IDBD sont propres à chaque classe d'enregistrements, uniques au sein des enregistrements avec état et uniques au sein des enregistrements sans état.

Remarque : 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 Utilisation d'enregistrements

Syntaxe

VBScript

entity.GetDbId 

Perl

$entity->GetDbId(); 
Identificateur
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).
Valeur renvoyée
A Long containing the Entity object's database ID.

Exemples

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); 

Commentaires en retour