Consultor Eletrônico



Kbase P73027: Dynamics Auditing fails with extent fields
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/5/2006
Status: Unverified

FACT(s) (Environment):

Dynamics 2.1A
OpenEdge 10.0B

SYMPTOM(s):

Dynamics 2.1A01

Auditing fails with extent fields

Auditing is enabled for the concerned table

The following errors occur:

** Array subscript 0 is out of range. (26)

** Array subscript <value> is out of range. (26)

Unable to extract BUFFER-VALUE for field <fieldname>. (7366)

CAUSE:

Bug# 20040319-006

CAUSE:

The icf/af/app/afauditlgp.p procedure was initially designed when extent fields when not supported by Dynamics.

It was not updated when support for extent fields was implemented in 2.0A02, and as a result fails to handle them correctly.

FIX:

Upgrade to OpenEdge 10.1A or later release

Workaround:
Manually modify icf/af/app/afauditlgp.p to take into account the extent fields.

This code is not very large and uses BUFFER-VALUE attribute *without* the optional integer input parameter necessary for extent fields.

Instead of always relying on the BUFFER-VALUE, it should be modified to take the buffer-field:EXTENT attribute into account:

If buffer-field:EXTENT = 0 it is not an extent field and should be processed as is using BUFFER-VALUE.
If buffer-field:EXTENT > 0 the extent values should be stored in a CHR(7) separated list:

DO viCounter = 1 TO hBufferField:EXTENT:
vcReturn = (IF vcReturn = "" THEN "" ELSE vcReturn + CHR(7)) + hBufferField:BUFFER-VALUE(viCounter).
END.