Consultor Eletrônico



Kbase 16811: WebSpeed 1.0 - Error (26) Array Subscript Out of Range.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   04/06/2010
Applies to WebSpeed 1.0

SUMMARY:

The following error will happen when users try to include more
than 100 fields in a form.

** Array subscript 101 is out of range. (26)
** Unable to update Field (142)

EXPLANATION:

The HTML FORM input fields are stored in array FieldVar.
This array has 100 extents, thus limiting the number of fields to 100.

SOLUTION:

If you hit this limit, you should first consider changing the layout of your HTML form. Having 100 input fields in one form is usually not necessary and can be split into separate forms.

However, if more than 100 fields is necessary, it is possible, though not recommended, to modify the array size.

Cautionary NOTE: WebSpeed has not been tested with different sizes of this array such that unforseen problems may arise in modifying the FieldVar array size. Additionally, this procedure only applies to WebSpeed 1.0.

To change the limit:
1) Make sure you have a backup of the original files in case
something goes wrong. Make a copy of the $DLC/src/web
and all its sub-directories in the working directory.

2) Start the transaction server in the working directory.
This needs to be done before ANY modifications to the source code.

3) Edit <working_dir>/src/web/method/cgiarray.i. Change the
definition of MAX-FIELDS preprocessor directive to the value you want. The default definition is "&GLOBAL-DEFINE MAX-FIELDS 100".

4) Recompile
src/web/objects/web-disp.p &
src/web/objects/web-util.p.
This can be done using the script editor.

5) Create a web/objects directory under the working
directory and move the r-code files into that directory.

6) Restart the transaction server and test if it runs. If you get errors in the error log and/or cannot run any web objects, something went wrong. In that case, restore the original files.

7) When you feel confident with the new web-util and
web-disp, you can copy them over the original files in
$DLC/tty/web/objects.

Since the result of doing this is effectively overriding a
design limit of the product, in case of any problems you
will have to make sure they are not caused by this change.