Kbase P18855: Why record CREATE and field ASSIGN statements with NO-ERROR
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  23/12/2003 |
|
Status: Unverified
SYMPTOM(s):
Neither the record CREATE statement nor the field ASSIGN statement is raising the ERROR condition.
Executing code similar to:
CREATE TableName NO-ERROR.
ASSIGN FieldName = 'x' NO-ERROR.
MESSAGE ERROR-STATUS:ERROR
VIEW-AS ALERT-BOX INFO BUTTONS OK.
The table "TableName" has a multi component unique index.
The field, "FieldName" is the leading component of the above mentioned multi component unique index? All other components have default values.
The code issues the index uniqueness violation error:
** <file-name> already exists with <field/value...>. (132)
but the ERROR-STATUS:ERROR attribute returns NO!
CAUSE:
What is failing here is the indexing of the newly created record due to its key uniqueness violation as evidenced by the error message.
FIX:
This is correct behavior. The ERROR-STATUS:ERROR correctly returns FALSE because both the CREATE statement and the ASSIGN statements succeed. Indexing failure does not raise the ERROR condition.