Database Error Messages

Release
toggle
  • 23ai
  • 21c
  • 19c
Updated
Jun 24, 2024

SQL-02126

Count of array elements cannot be negative (i.e. < 0)

Cause

The precompiler found a negative number of array elements in the the N or F element of the SQLDA (SQL Descriptor Area, which is used with dynamic SQL Method 4). Before executing the DESCRIBE statement, N must be set to the dimension of the descriptor arrays. After executing the DESCRIBE statement, N must be reset to the actual number of variables DESCRIBEd, which is stored in the F variable.


Action

Check that the N or F variables are set to non-negative values.