Kbase P103161: Error (132): Creating records of a TEMP-TABLE having a UNIQUE index.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/18/2010 |
|
Status: Verified
SYMPTOM(s):
Error (132): Creating records of a TEMP-TABLE having a UNIQUE index.
** <file-name> already exists with <field/value...>. (132)
** ttTABLE already exists with "" "". (132)
ttTABLE has a two component UNIQUE index made up of CHARACTER fields.
The error is generated running code similar to the following snippet:
DEFINE TEMP-TABLE ttTABLE
FIELD F1 AS CHARACTER
FIELD F2 AS CHARACTER
INDEX if1f2 IS PRIMARY UNIQUE F1 F2.
/* The first time we create a record with F1 & F2 as blanks, there is no INDEXING failure */
CREATE ttTABLE.
MESSAGE
"We did get away with the first record with the two components of the unique index as blanks!"
"The problem will be generated when we try to do it again causing the UNIQUE indexing of the table to fail."
VIEW-AS ALERT-BOX INFO BUTTONS OK.
/* The second time we create a record with F1 & F2 as blanks, an INDEXING failure occurs causing the error 132*/
CREATE ttTABLE.
FACT(s) (Environment):
All Supported Operating Systems
Progress 9.x
OpenEdge 10.x
CAUSE:
This is expected behavior. Error 132 will be generated whenever an attempt is made violate the index uniqueness of a table. In the above code, both CREATE statements succeed. However, the indexing fails because F1 + F2 must be a UNIQUE value to satisfy the requirement of the UNIQUE index made of these two fields.
FIX:
Ensure that the code logic assigns non blank values to the fields involved in all UNIQUE indexes and that these values do not include any duplicate index values.