Microsoft KB Archive/171358

From BetaArchive Wiki

PRB: 'Uniqueness of index HI_ID is violated' Error in ATS

ID: Q171358

The information in this article applies to:

  • Microsoft Anomaly Tracking System, version 1.0

SYMPTOMS

When attempting to save a new bug or save changes for an existing bug in the Microsoft Anomaly System (ATS), the following error occurs when clicking Save:

   Uniqueness of index HI_ID is violated.

CAUSE

The Pk_nextid field in table ftpk.dbf for the fthist record contains an invalid value.

RESOLUTION

To solve the problem, the Pk_nextid field needs to be changed to the correct value to be used in fthist.dbf.

To determine the correct value to place in the Pk_nextid field for fthist.dbf, follow these steps:

Steps to determine correct value for "Pk_nextid"

1. Open Fthist.dbf by typing: USE Fthist.dbf in the FoxPro Command window.

2. BROWSE the table and look at the highest value for the HI_ID field.

   NOTE: This should be the same as the record count for Fthist.dbf.

3. Open Ftpk.dbf by typing: USE Ftpk.dbf in the FoxPro Command window. 4. Replace the Pk_nextid field in Ftpk.dbf on the Fthist record to the next

   number from the highest HI_ID observed in Fthist.dbf.

   For example, if the highest HI_ID value in Fthist.dbf is 100, then the
   correct value to place in the Pk_nextid field for the Fthist record in
   Ftpk.dbf is 101.

5. Close all tables and exit FoxPro. It is now possible to resume adding and editing bugs in ATS.

STATUS

This behavior is by design.

MORE INFORMATION

Whenever changes to an existing bug are made or when new bugs are added to ATS, a new entry is made in Fthist.dbf. This table maintains a history of all bug information that has been input into ATS. The Ftpk.dbf table maintains the next primary key values that will be used in the various tables throughout ATS.

To reproduce the symptoms when the Pk_nextid field for Fthist contains an invalid value, follow these steps:

Steps to Reproduce Behavior

1. Open Fthist.dbf by typing: USE Fthist.dbf in the FoxPro Command window.

2. BROWSE Fthist.dbf and note the highest value for the HI_ID field.

   NOTE: The highest value for 'HI_ID' should be the same as the number of
   records in Fthist.dbf.

3. Open Ftpk.dbf by typing: USE Ftpk.dbf in the FoxPro Command window. 4. BROWSE Ftpk.dbf and in the Pk_nextid field for the Fthist row, replace

   the value that is there with the same number as observed in step 2
   above.

5. Close all tables and exit FoxPro. 6. Log back into ATS and make a change to an existing bug, or add a new

   bug.

NOTE: When clicking Save, the "Uniqueness of index HI_ID is violated" message appears. Additional query words: MSATS

Keywords          : kbtool kbVFp FxtoolGeneral 
Version           : WINDOWS:1.0
Platform          : WINDOWS
Issue type        : kbprb

Last Reviewed: July 18, 1997
© 1999 Microsoft Corporation. All rights reserved. Terms of Use.