Informix Error -22234: Buffer provided by user is too small. Result will be truncated to fit buffer.
Cause and resolution
Buffer provided by user is too small. Result will be truncated to fit buffer.
The buffer that is used to store the result of the operation of the function is too small to hold the entire result. As much of the result as possible was copied, and extra characters were truncated. Increase the buffer declaration so that it can hold larger strings.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-22234 fires when a user-provided buffer is too small to hold a function's full result — per the official guidance, as much as possible is copied and the rest is truncated.
- A user-provided buffer too small for the function's full result, per the official guidance — the direct, only cause.
Solutions / Resolution
- Increase the buffer declaration so it can hold larger strings, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond an undersized result buffer.
Diagnostic Checks
- Check the buffer's declared size against the function's maximum possible result length, and increase it if too small.
Related Errors / Related Topics
- -22275 — "INTERNAL ERROR: Temporary buffer length has been exceeded." A related buffer-size error, on an internal temporary buffer rather than a user-provided result buffer.
A user-provided buffer was too small for the function's result, which was truncated to fit — increase the buffer's declared size.