- 论坛徽章:
- 0
|
SQL0302N The value of a host variable in the EXECUTE or OPEN statement is too large for its corresponding use. SQLSTATE=22003
是这个错误代码,在运行的时候发生的.大概意思是插入数据库的字段和数据库里定义的不符合,我找到了详细的错误解释:
- bash-3.00$ db2 ? SQL0302N
- SQL0302N The value of a host variable in the EXECUTE or OPEN
- statement is too large for its corresponding use.
- Explanation:
- The value of an input host variable was found to be too large for
- its use in the SELECT, VALUES, or prepared statement. One of the
- following occurred:
- o The corresponding host variable or parameter marker used in
- the SQL statement is defined as string, but the input host
- variable contains a string that is too long.
- o The corresponding host variable or parameter marker used in
- the SQL statement is defined as numeric, but the input host
- variable contains a numeric value that is too large.
- o The terminating NUL character is missing from the C language
- NUL-terminated character string host variable.
- o Federated system users: in a pass-through session, a data
- source-specific restriction might have been violated.
- This error occurs as a result of specifying either an incorrect
- host variable or an incorrect SQLLEN value in an SQLDA on an
- EXECUTE or OPEN statement.
- The statement cannot be processed.
- User Response:
- Ensure that the input host variable value is the correct type and
- length. If the input host variables supply values to parameter
- markers, match values with the implied data type and length of
- the parameter marker.
- Federated system users: for a pass-through session, determine
- what data source is causing the error (see the problem
- determination guide for procedures to follow to identify the
- failing data source). Examine the SQL dialect for that data
- source to determine which specific restriction has been violated,
- and adjust the failing statement as needed.
- sqlcode : -302
- sqlstate : 22001, 22003
复制代码
但我仔细检查过那些字段了,应该是没有上述情况的啊.
有没有人碰到过这个问题,还有什么其他的情况会导致这样啊.我把set语句后面的字段一个一个排查过来,就是每次就set一个字段还是不行. |
|