Retrieve a LONG VARCHAR, LONG NVARCHAR, or LONG BINARY value using static SQL.
Prerequisites
There are no prerequisites for this task.
Task- Declare a host variable of type DECL_LONGVARCHAR, DECL_LONGNVARCHAR, or DECL_LONGBINARY, as appropriate. The array_len member is filled in automatically.
- Retrieve the data using FETCH, GET DATA, or EXECUTE INTO. SAP Sybase IQ
sets the following information:
- indicator variable – Negative if the value is NULL, 0 if there is no truncation, otherwise the positive untruncated length in bytes up to a maximum of 32767.
- stored_len – The number of bytes stored in the array. Always less than or equal to array_len and untrunc_len.
- untrunc_len – The number of bytes that would be stored in the array if the value was not truncated. Always greater than or equal to stored_len. If truncation occurs, this value is larger than array_len.
The LONG data is retrieved using static SQL.