gulya2005
31st March 2008, 14:14
for k = 1 to audit_flds
alloc.mem(values,AUD_MAX_FLD_SIZE,2)
ind = aud_get_fld_values(k, colinfo, rec_buff, values)
free.mem(values)
endfor


Fatal Error: aud_get_fld_values.colinfo index 8225 out of dims [2] 172
Fatal Error: Can`t continue....


When the type of operation is delete or insert this code works fine. But when the type of operation is update, it returns error. What`s wrong here?

george7a
3rd April 2008, 13:39
Hi,

You might want to alocate more space for the colinfo variable using alloc.mem. The following sample program might help:
http://www.baanboard.com/programmers_manual_baanerp_help_functions_aud_audit_information_sample_program

I hope it helps,

- George

gulya2005
4th April 2008, 08:24
Hi,

You might want to alocate more space for the colinfo variable using alloc.mem. The following sample program might help:
http://www.baanboard.com/programmers_manual_baanerp_help_functions_aud_audit_information_sample_program

I hope it helps,

- George
Where should we allocate more space? We use this code to allocate memory for colinfo
alloc.mem( colinfo, 3, audit_flds )
We tried to change second parameter to '200' and third parameter to 'audit_flds+200', but errors hadn`t disappeared..

george7a
4th April 2008, 08:53
You might want to debug the code then you will know exactly which parameter to increase. As I see it in the error the number you need is 8225! A documentation of alloc.mem is available here:
http://www.baanboard.com/programmers_manual_baanerp_help_functions_memory_operations_alloc_mem

- George