免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1820 | 回复: 2
打印 上一主题 下一主题

关于BLOB的一个问题,急 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-09-15 19:41 |只看该作者 |倒序浏览
我现在用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 [])啊,怎么有什么字符串呢?郁闷。

求高手指点。谢谢

论坛徽章:
0
2 [报告]
发表于 2004-09-16 21:08 |只看该作者

关于BLOB的一个问题,急

怎么没人说呢?

论坛徽章:
0
3 [报告]
发表于 2004-09-17 00:32 |只看该作者

关于BLOB的一个问题,急

请把代码贴出来给大家看一下,要不然人家怎么帮你找原因阿!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP