Aviso importante
Caso tenhas alguma
dúvida a respeito
da linguagem mande
um e-mail que terás
a resposta.
C. A. Dornelles
SQL - SQLCODE's - Códigos positivos
Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF.
SQLCode +239
SQLDA INCLUDES
integer1
SQLVAR ENTRIES, BUT
integer2
ARE REQUIRED FOR
integer3
COLUMNS BECAUSE AT LEAST ONE OF THE COLUMNS BEING DESCRIBED IS A DISTINCT TYPE
Causa
Given that at least one of the columns being described is a distinct type, space should be provided for the
extended
SQLVAR entries in addition to the
base
SQLVAR entries. The value of SQLN,
integer1
, indicates that there are not enough SQLVAR entries for the base and extended SQLVAR entries.
The total number of SQLVAR entries that are required depends on whether USING BOTH was specified or not (
n
is the number of columns being described which is
integer3
),
With USING BOTH, space should be allocated for
3n
SQLVAR entries.
Otherwise, space should be allocated for
2n
SQLVAR entries.
The number of SQLVAR entries that are needed to return all of the information about the columns is
integer2
.
Note: in the case of DESCRIBE INPUT, each reference to
column
would actually be
parameter
.
Ação do sistema
DB2 has set the SQLDAID 7th byte flag "on" because sufficient space was not provided for the
extended
SQLVAR entries. The value of the 7th byte flag indicates how many SQLVAR entries are needed for each column. DB2 has not set any SQLVAR entries. :elq.
Resposta ao Desenvolvedor
If the distinct type information is needed, the value of the SQLN field in the SQLDA should be increased to
integer2
(after making sure the SQLDA is large enough to support that amount) and the statement should be resubmitted.
If there is no need for the additional information about the distinct type(s) in the result set, then it is possible to resubmit the statement only providing enough SQLVAR entries to accommodate the number of columns being described (i.e. provide the necessary number of
base
SQL entries).
SQLSTATE: 01005