|
I am having a really weird embedded sql problem. I am just
retrieving a value from a database field, nothing special. The
database field is defined VARCHAR(32000). The value in the field
is about 200 characters long. The receiving variable is defined
32000A.
Most of the time the variable is filled correctly and is padded
with spaces (x'40'). But some times the variable is padded with
x'20' instead of x'40' and I got no clue why. The retrieved value
though is correct. Only the padded space is wrong.
We are on 6.1.
Schmidt, Mihael wrote:
Defining the variable as VARYING solved the problem.
Originally I fetched multiple rows with one statement. Changing
that to single row fetch also solved the problem (even without
changing the variable to VARYING).
SQLCODE is always 0. It is a nullable field but the null
indicator is also 0.
So I can't explain it but now I have a good workaround.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.