[IBM] [CLI驱动程序] CLI0109E字符串数据右截断。 SQLSTATE = 22001 [英] [IBM][CLI Driver] CLI0109E String data right truncation. SQLSTATE=22001

查看:1059
本文介绍了[IBM] [CLI驱动程序] CLI0109E字符串数据右截断。 SQLSTATE = 22001的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个使用ADO 2.5版的VB6应用程序,我收到了一个

" [IBM] [CLI Driver] CLI0109E字符串数据右截断。

SQLSTATE = 22001"执行rs.UpdateBatch方法时出错。我确定错误是由扩展的ascii字符164

(?)引起的。有没有其他人遇到过这个问题并找到了解决方案。


TIA


Joel Brewster

相互奥马哈

We have a VB6 application using ADO version 2.5 and I am receiving a
"[IBM][CLI Driver] CLI0109E String data right truncation.
SQLSTATE=22001" error when I execute the rs.UpdateBatch method. I have
determined that the error is caused by an extended ascii character 164
(?). Has anyone else encountered this problem and found a solution.

TIA

Joel Brewster
Mutual Of Omaha

推荐答案

检查以确保您没有插入比字段大的值

可以容纳。


当你尝试将超过10个/ b $ b字符的内容插入varchar(10)
时,你可能会收到此错误。 >
Check to make sure you are not inserting a value bigger than the field
can hold.

You might get this error when u try to insert anything more than 10
chars into a field which is varchar(10)


考虑到遇到

错误时正在处理的字母,您可能遇到某种代码页问题。不幸的是,

我从来没有太多关于代码页和编码所以我不能真的

建议如何解决问题,除了使用用于查询代码页的DB2信息中心中的搜索引擎和/或编码。


但是我怀疑Visu是正确的,因为他认为字符串可能只是对于列中的字符串太长了你试图把它;肯定是错误信息所暗示的那个'/ b $ b。您可以通过将问题行的数据更改为仅包含

标准ASCII字符然后查看是否发生相同的错误来相当容易地确认

。如果它确实是b $ b,它可能是一个真正的截断错误;如果它没有截断

错误可能掩盖了*真正的*问题,这是数据中无效的

字符。

犀牛


< jo *********** @ mutualofomaha.com>在消息中写道

新闻:11 ********************* @ f14g2000cwb.googlegro ups.com ...

我们有一个使用ADO 2.5版的VB6应用程序,我收到了一个

" [IBM] [CLI Driver] CLI0109E字符串数据右截断。

SQLSTATE = 22001"执行rs.UpdateBatch方法时出错。我确定错误是由扩展的ascii字符164

(?)引起的。有没有其他人遇到过这个问题并找到了解决方案。


TIA


Joel Brewster

相互奥马哈
Considering the letter that is being processed when you encounter the
error, you may be having a code page problem of some kind. Unfortunately,
I''ve never had much to do with code pages and encoding so I can''t really
suggest how to resolve the problem, other than to use the Search Engine in
the DB2 Info Center to look up "codepage" and/or "encoding".

But I suspect that Visu is right when he suggests that the string may simply
be too long for the column in which you are trying to put it; that''s
certainly what the error message implies. You could probably confirm that
fairly easily by changing the data for the problem row to contain only
standard ASCII characters and then seeing if the same error occurs. If it
does, it''s probably a genuine truncation error; if it doesn''t the truncation
error was probably masking the *real* problem, which was an invalid
character in the data.

Rhino

<jo***********@mutualofomaha.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
We have a VB6 application using ADO version 2.5 and I am receiving a
"[IBM][CLI Driver] CLI0109E String data right truncation.
SQLSTATE=22001" error when I execute the rs.UpdateBatch method. I have
determined that the error is caused by an extended ascii character 164
(?). Has anyone else encountered this problem and found a solution.

TIA

Joel Brewster
Mutual Of Omaha


我们一直在ADO上插入来自VB6的德语变音符号(Windows在

英语,瑞士(德国)的DB2代码页)。您的错误消息是奇怪的:

" ... [CLI Driver] ..."。发布ADO配置的确切定义

和连接字符串,以及

Windows和DB2数据库的代码页配置(即您支持吗?) 。此外 - 如果您使用的是DB2 V7.x或更早版本,请特别使用
- 尝试使用MS ADO over ODBC驱动程序与IBM ODBC驱动程序结合使用。


< jo *********** @ mutualofomaha.com>在消息中写道

新闻:11 ********************* @ f14g2000cwb.googlegro ups.com ...

我们有一个使用ADO 2.5版的VB6应用程序,我收到了一个

" [IBM] [CLI Driver] CLI0109E字符串数据右截断。

SQLSTATE = 22001"执行rs.UpdateBatch方法时出错。我确定错误是由扩展的ascii字符164

(?)引起的。有没有其他人遇到过这个问题并找到了解决方案。


TIA


Joel Brewster

相互奥马哈
We insert german diacriticals from VB6 over ADO all the time (Windows in
English, DB2 code page for Switzerland (German)). Your error message is odd:
"...[CLI Driver]...". Post the exact definition of your ADO configurationa
and connection string, as well as the codepage configurations of both your
Windows and your DB2 database (i.e. is your ? supported?). Also - especially
if you''re on DB2 V7.x or earlier - try using the MS ADO over ODBC driver in
conjunction with the IBM ODBC driver.

<jo***********@mutualofomaha.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
We have a VB6 application using ADO version 2.5 and I am receiving a
"[IBM][CLI Driver] CLI0109E String data right truncation.
SQLSTATE=22001" error when I execute the rs.UpdateBatch method. I have
determined that the error is caused by an extended ascii character 164
(?). Has anyone else encountered this problem and found a solution.

TIA

Joel Brewster
Mutual Of Omaha


这篇关于[IBM] [CLI驱动程序] CLI0109E字符串数据右截断。 SQLSTATE = 22001的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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