- 论坛徽章:
- 0
|
我现在用JAVA要将图片写入一个BLOB类型的字段,WINXP,DB2V7。但是图片到32K大小的时候就出错了,错误信息如下:
java.sql.SQLException: [IBM][CLI Driver] CLI0102E Invalid conversion. SQLSTATE=07006
我查了SQL0102的错误代码信息是:
SQL0102N The string constant beginning with "<string>;" is too
long.
Explanation: One of the following has occurred:
o The comment in the COMMENT ON statement is greater than 254
bytes.
o The application server name specified in the SQL CONNECT
statement is greater than 18 characters.
o The string constant beginning with "<string>;" has a length
greater than 32672 bytes. Character strings with lengths greater
than 32672 bytes or graphic strings with lengths greater than 1633
characters can be specified only through assignment from host
variables. Note that other servers in the DB2 family of products
may specify a different size limit for character strings. Consult
the documentation for the appropriate DB2 product for details.
o Federated system users: the data source-specific limits must
not be exceeded in a pass-through session. For example, a
character literal larger than 254 bytes included in a
statement sent to DB2 for OS/390 in a pass-through session
would cause this error.
It may be that data conversion is occurring and the resultant
string is too long. For connections between applications and
databases running under different codepages, string constants are
converted from the application codepage to the database codepage.
In certain situations, graphic string constants may be further
converted from the database codepage to a UCS-2 (UNICODE)
encoding, for example when the database has been created with an
EUC codepage. This means that it is possible to have a resultant
string which is longer than the input string.
The statement cannot be processed.
我字段的定义是:piccont blob(102400) logged not compact
按照错误信息,好象是涉及到字符串,可是我用的是setBytes(byte [])啊,怎么有什么字符串呢?郁闷。
求高手指点。谢谢 |
|