Kbase P558: Error 7888 when executing SQL-92 queries with an array data type field
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  7/24/2008 |
|
Status: Verified
SYMPTOM(s):
Error 7888 when executing SQL-92 queries with an array data type field
Array reference/update incorrect. (7888)
ODBC Error: [MERANT][ODBC PROGRESS driver][PROGRESS]Array reference/update incorrect. (7888)
Supplied the same amount of values as the element count
Running the Progress GUI Client
FACT(s) (Environment):
Progress 9.x
All Supported Operating Systems
CAUSE:
The width of the field is the cause. If the SQL-WIDTH property is defined for the array, the width must allow enough space to contain all array elements after they have been converted to character form, plus some delimiting characters. The initial width set by the underlying schema code uses the array column's FORMAT and EXTENT sizes to estimate the value. That estimated value might be too small in some cases.
FIX:
If reaching the error, verify that the SQL-width is set appropriately for the field. The default SQL width for array data type fields is calculated by the following formula:
((4GL_format * 2) * number_of_extents) + (number_of_extents * 2)
To avoid the error, set the SQL width of the array field to: <the total maximum number of characters in the array> + 3.
Follow these steps to change the field width value:
1) Start Data Dictionary and connect to the database.
2) Select the table, and then the specific field.
3) Select menu Options > SQL Properties > Adjust SQL Width.
4) Set the width value.
It may also be possible to resolve the problem by ensuring that the array string has a semicolon for each "empty" element in the array. For example, if you are inserting only the first two elements of a five element string the string should look like this ... '1;2;;;'.