JDBC,CLI0109E,VARCHAR(2000)到VARCHAR(4000) [英] JDBC,CLI0109E,VARCHAR(2000) to VARCHAR(4000)

查看:108
本文介绍了JDBC,CLI0109E,VARCHAR(2000)到VARCHAR(4000)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用WinTel上的Weblogic 8.1.3。

Sun64上的DB2 8.1.4。

我正在使用Weblogic DB2的Type 2驱动程序一直非常可靠 - 到目前为止。


我有一个PreparedStatement可以完美更新

表是定义,以便一个特定列具有

数据类型VARCHAR(2000)。


该表最近被修改,以便
$ b的数据类型$ b列现在是VARCHAR(4000)。


插入数据时SQL语句继续完美运行

由2000个或更少的字符组成。


更新一个包含3990个字符的列后,发生以下

错误:


COM.ibm.db2.jdbc.DB2Exception :[IBM] [CLI驱动程序] CLI0109E字符串数据

右截断。 SQLSTATE = 22001


我不知道问题的根源,而且'

你的建议会非常有用。


CLI0190E的DB2消息参考建议使用

SQLSetParam或SQLBindParameter,但这听起来不像

建议相关对于JDBC应用程序。


一些谷歌帖子提示这是一个数据库配置

问题和数据库配置文件的更改

可能会解决问题。如果是这种情况,那么

的更多信息将非常有用。


在一些谷歌帖子中,开发人员认为这是一个

问题可以用不同的数据库解决

驱动程序。类型2驱动程序是否不支持 varchar 4000?


谢谢。

I''m driving Weblogic 8.1.3 on WinTel.
DB2 8.1.4 on Sun64.
I''m using Weblogic DB2''s Type 2 driver, which has been very
reliable - so far.

I have a PreparedStatement that updates perfectly when
the table is define so that one particular column has
datatype VARCHAR(2000) .

The table was recently modified so that the data type for
the column is now VARCHAR(4000).

SQL statements continue to work perfectly when inserting data
consisting of 2000 or fewer characters.

Upon updating a column with 3990 characters the following
error occurs :

COM.ibm.db2.jdbc.DB2Exception : [IBM][CLI Driver] CLI0109E String data
right truncation. SQLSTATE=22001

I haven''t a clue as to the source of the problem and that''s
where your suggestions would be very helpful.

The DB2 Message Reference for CLI0190E suggests to use
SQLSetParam or SQLBindParameter, but that doesn''t sound like
advice relavant for a JDBC application.

A few google posts suggest that this is a database configuration
issue and that a change in a database configuration file
might fix things. If this is the case more information on
that would be very useful.

In some Google posts developers fathomed that this was an
issue which could be resolved with a different database
driver. Does the type 2 driver "not support" varchar 4000?

Thanks.

推荐答案



gi **************** ***@yahoo.com 写道:


gi*******************@yahoo.com wrote:
我在WinTel上驾驶Weblogic 8.1.3。
Sun64上的DB2 8.1.4。 />我正在使用Weblogic DB2的Type 2驱动程序,它一直非常可靠 - 到目前为止。

我有一个PreparedStatement,当它完全更新时
table是定义的,因此一个特定的列具有数据类型VARCHAR(2000)。

该表最近被修改,因此该列的数据类型现在是VARCHAR(4000) 。

插入数据时,SQL语句继续完美地工作。
由2000个或更少的字符组成。

更新一个包含3990个字符的列以下
发生错误:

COM.ibm.db2.jdbc.DB2Exception:[IBM] [CLI Driver] CLI0109E字符串数据
右截断离子。 SQLSTATE = 22001


嗨。我很乐意帮助你,但是你展示的例外情况似乎来自IBM驱动程序,而不是来自WebLogic的
。我们提供了一个type-4(所有Java)驱动程序。

如果在表更改后重新启动weblogic

会出现同样的问题吗?

BEA的Joe Weinstein

我不知道问题的根源,那就是你的建议非常有用的地方。
CLI0190E的DB2消息参考建议使用SQLSetParam或SQLBindParameter,但这听起来并不像JDBC应用程序的建议相关性。

一些谷歌帖子建议这是一个数据库配置问题,而且数据库配置文件中的更改可能会解决问题。如果是这样的话,更多关于
的信息非常有用。

在一些Google帖子中,开发人员发现这是一个可以用不同的数据库解决的问题<司机。类型2驱动程序是否不支持 varchar 4000?

谢谢。
I''m driving Weblogic 8.1.3 on WinTel.
DB2 8.1.4 on Sun64.
I''m using Weblogic DB2''s Type 2 driver, which has been very
reliable - so far.

I have a PreparedStatement that updates perfectly when
the table is define so that one particular column has
datatype VARCHAR(2000) .

The table was recently modified so that the data type for
the column is now VARCHAR(4000).

SQL statements continue to work perfectly when inserting data
consisting of 2000 or fewer characters.

Upon updating a column with 3990 characters the following
error occurs :

COM.ibm.db2.jdbc.DB2Exception : [IBM][CLI Driver] CLI0109E String data
right truncation. SQLSTATE=22001
Hi. I''ll be glad to help you, but the exception you show
seems to be from an IBM driver, not the one that comes
with WebLogic. We provide a type-4 (all Java) driver.
Does the same problem occur if you restart weblogic
after the table has changed?
Joe Weinstein at BEA

I haven''t a clue as to the source of the problem and that''s
where your suggestions would be very helpful.

The DB2 Message Reference for CLI0190E suggests to use
SQLSetParam or SQLBindParameter, but that doesn''t sound like
advice relavant for a JDBC application.

A few google posts suggest that this is a database configuration
issue and that a change in a database configuration file
might fix things. If this is the case more information on
that would be very useful.

In some Google posts developers fathomed that this was an
issue which could be resolved with a different database
driver. Does the type 2 driver "not support" varchar 4000?

Thanks.






我最近在使用DB2创建varchar(4000)列时遇到了问题这是CLP。

(我后来发现我只能创建它,如果这是表中唯一的一列
。)我将我的应用程序更改为LONG VARCHAR它有效。


-

--------------------

Larry Menard

鹅和自然物的后卫

< gi *************** ****@yahoo.com>在消息中写道

news:11 ********************** @ z14g2000cwz.googlegr oups.com ...
I recently had a problem creating a varchar(4000) column using DB2''s CLP.
(I later found that I could only create it if that was the only column in
the table.) I changed my app to LONG VARCHAR and it worked.

--
--------------------
Larry Menard
"Defender of Geese and of All Things Natural"
<gi*******************@yahoo.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
我正在WinTel上推动Weblogic 8.1.3。
Sun64上的DB2 8.1.4。
我正在使用Weblogic DB2的Type 2驱动程序,它已经非常<可靠 - 到目前为止。

我有一个PreparedStatement,可以在定义表时完美更新,以便一个特定的列具有数据类型VARCHAR(2000)。最近修改了表格,以便列的数据类型现在为VARCHAR(4000)。

插入数据时SQL语句继续正常工作由2000个或更少的字符组成。

更新一个包含3990个字符的列时,会发生以下错误:

COM.ibm.db2.jdbc.DB2Exception: [IBM] [CLI驱动程序] CLI0109E字符串数据
右截断。 SQLSTATE = 22001

我不知道问题的根源,那就是你的建议非常有用的地方。

CLI0190E的DB2消息参考建议使用SQLSetParam或SQLBindParameter,但这听起来并不像JDBC应用程序的建议相关。

一些谷歌帖子表明这个是一个数据库配置问题,并且数据库配置文件中的更改可能会解决问题。如果是这样的话,更多关于
的信息非常有用。

在一些Google帖子中,开发人员发现这是一个可以用不同的数据库解决的问题<司机。类型2驱动程序是否不支持 varchar 4000?

谢谢。
I''m driving Weblogic 8.1.3 on WinTel.
DB2 8.1.4 on Sun64.
I''m using Weblogic DB2''s Type 2 driver, which has been very
reliable - so far.

I have a PreparedStatement that updates perfectly when
the table is define so that one particular column has
datatype VARCHAR(2000) .

The table was recently modified so that the data type for
the column is now VARCHAR(4000).

SQL statements continue to work perfectly when inserting data
consisting of 2000 or fewer characters.

Upon updating a column with 3990 characters the following
error occurs :

COM.ibm.db2.jdbc.DB2Exception : [IBM][CLI Driver] CLI0109E String data
right truncation. SQLSTATE=22001

I haven''t a clue as to the source of the problem and that''s
where your suggestions would be very helpful.

The DB2 Message Reference for CLI0190E suggests to use
SQLSetParam or SQLBindParameter, but that doesn''t sound like
advice relavant for a JDBC application.

A few google posts suggest that this is a database configuration
issue and that a change in a database configuration file
might fix things. If this is the case more information on
that would be very useful.

In some Google posts developers fathomed that this was an
issue which could be resolved with a different database
driver. Does the type 2 driver "not support" varchar 4000?

Thanks.



" Larry Menard" < RO ** @ GoSpamYourself.com>在消息中写道

news:q9 ******************** @ rogers.com ...
"Larry Menard" <ro**@GoSpamYourself.com> wrote in message
news:q9********************@rogers.com...
I最近在使用DB2的
CLP创建varchar(4000)列时遇到了问题。 (后来发现我只能创建它,如果那是表中唯一的
列。)我将我的应用程序更改为LONG VARCHAR并且它有效。

-
--------------------
Larry Menard
I recently had a problem creating a varchar(4000) column using DB2''s
CLP. (I later found that I could only create it if that was the only
column in the table.) I changed my app to LONG VARCHAR and it worked.

--
--------------------
Larry Menard




表空间的页面大小是多少?



What was the page size of the tablespace?


这篇关于JDBC,CLI0109E,VARCHAR(2000)到VARCHAR(4000)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆