473,419 Members | 1,686 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

[IBM][CLI Driver] CLI0109E String data right truncation. SQLSTATE=22001

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

Nov 12 '05 #1
10 49535
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)

Nov 12 '05 #2
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
Nov 12 '05 #3
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
Nov 12 '05 #4
RdR
Hi Joel,

Two things I can suggest to look for among others suggested by others in
this newsgroup:

1) I saw some issues when the System code page is different from the
Database code page. Are you using double byte characters (Chinese, Japanese,
etc.)? I saw a similar situation when Windows has an English code page but
DB2 is using Traditional Chinese (DBCS).

2) I do not know what the applicaiton does but if it writes a DB2 Timestamp
to a SQL Server Datetime field, the DB2 Timestamp is longer than the SQL
Server Datetime field.

Hope this helps,

RdR
<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
Nov 12 '05 #5
Hi,

I've the same error, but I don't have solution yet.

I'm using ADO 2.5, and OLE DB for ODBC and IBM ODBC driver, attached to a
DB2 7 on OS/390

I have a clue (maybe) for you. If I connect to a local or remote UDB
database (V7 too), it works fine, but when I connect to MVS DB2 (EBCDIC) it
fails. Please, if you find a solution, let me know.

I have another strange symptom. If I do un update to a field that PREVIOUSLY
had a 'Ñ', even if I remove the 'Ñ', it fails (yes, it's true, we have
checked several times).

P.S: Really, we are not using rs.UpdateBatch. We are using a DataGrid
directly.

Jose Manuel
"Mark Yudkin" <my***********************@boing.org> wrote in message
news:42**********************@news.sunrise.ch...
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

Nov 12 '05 #6
All,

I still do not have a solution, but I looking into some of the
suggestions that have been made. Thank you very much for your
responses. Here is some additional information that I did not include
originally:
1. The error message that I posted is exactly what came from the
driver, but I do think that this error is not the *real* problem.
2. I don't think it is the size of the field causing that problem
because I change the ñ to an n and everything works fine (This is
assuming that the translated values for each of these characters are
the same size).
3. I am able to write a SQL statement that will insert the ñ value
into the field via a pass through query, thus making me think it is not
a DB2 issue, but I will check with a DBA to see what code pages are
supported.
4. We are using DB2 V7.1 OS/390, ADO 2.5, and IBM DB2 ODBC Driver V
7.01.00.65.
5. The driver is set up to do timestamps as char(26) and this is
functioning correctly.
6. We are using a DSN connection that looks like the following:
"DSN=DBT1;UID=XXX;PWD=XXX"

Nov 12 '05 #7
What are the Host and the Windows codepages? The character mapping should be
handled by the DRDA protocol in your DB2 Connect setup.

BTW, your best bet is to open a PMR with IBM rather than to ask here. That
way, you get proper attention.

(P.S. If you'd said OS/390 from the beginning, I wouldn't have assumed you
were talking pure UDB on Windows)

<jo***********@mutualofomaha.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
All,

I still do not have a solution, but I looking into some of the
suggestions that have been made. Thank you very much for your
responses. Here is some additional information that I did not include
originally:
1. The error message that I posted is exactly what came from the
driver, but I do think that this error is not the *real* problem.
2. I don't think it is the size of the field causing that problem
because I change the ñ to an n and everything works fine (This is
assuming that the translated values for each of these characters are
the same size).
3. I am able to write a SQL statement that will insert the ñ value
into the field via a pass through query, thus making me think it is not
a DB2 issue, but I will check with a DBA to see what code pages are
supported.
4. We are using DB2 V7.1 OS/390, ADO 2.5, and IBM DB2 ODBC Driver V
7.01.00.65.
5. The driver is set up to do timestamps as char(26) and this is
functioning correctly.
6. We are using a DSN connection that looks like the following:
"DSN=DBT1;UID=XXX;PWD=XXX"
Nov 12 '05 #8
Mark,

Thanks for the response. You are correct, I should have included more
information to begin with, sorry. The windows code page= 437 and the
DBA sent me the following for the DB2 code pages

SCCSID=37, EBCDIC CODED CHAR SET
MCCSID=65534, EBCDIC CODED CHAR SET
GCCSID=65534, EBCDIC CODED CHAR SET
ASCCSID=1252, ASCII CODED CHAR SET
AMCCSID=65534, ASCII CODED CHAR SET
AGCCSID=65534, ASCII CODED CHAR SET

I have run a couple of additional tests since my last post though that
lead me to think that the problem lies within the application that
creates the dbf files. Here are the tests that I ran.
1. I was able to successfully insert a record into the DB2 table via a
standard ODBC call. (eg. - "INSERT INTO <table> (eename) VALUES
(''Ordoñez');
2. I was able to successfully insert a record into the DB2 table via a
stored procedure call.

It appears as though the Foxpro application that creates this file may
have some issues because when I look at the field via the user
interface, it displays a strange character in place of the ñ. I will
have to do some more research.

Thanks
Joel

Nov 12 '05 #9
All,

We found a solution if you are interested. We upgraded our driver
version from DB2 V7.1.0.65 to DB2 V8.1.6.705. Hopefully this will help
anyone else that has a similar problem. Thank you all for your
responses.

Joel

Nov 12 '05 #10
Weel you got there.
<jo***********@mutualofomaha.com> wrote in message
news:11*********************@l41g2000cwc.googlegro ups.com...
All,

We found a solution if you are interested. We upgraded our driver
version from DB2 V7.1.0.65 to DB2 V8.1.6.705. Hopefully this will help
anyone else that has a similar problem. Thank you all for your
responses.

Joel

Nov 12 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: gimme_this_gimme_that | last post by:
When you get the message : String data right truncation. SQLSTATE=22001 What is usually the source of the problem? Might a null value assigned get a PreparedStatement's setString method be...
0
by: Trophy Thief | last post by:
I'm getting an odd error when I try to run a select statement in my stored procedure. I need to select records where one field = the first host variable, and the second host variable is between the...
18
by: gimme_this_gimme_that | last post by:
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...
2
by: roha_78 | last post by:
COM.ibm.db2.jdbc.DB2Exception: CLI0109E String data right truncation. SQLSTATE=22001 at com.ibm.ejs.container.ContainerManagedBeanO.postCreate(ContainerManagedBeanO.java:500) at...
2
by: roha_78 | last post by:
i am using the follwing code to connect to db2 : java.sql.Connection connection = null; java.sql.ResultSet rs = null; ExperimentJDBCHelperBean jdbchelper = new ExperimentJDBCHelperBean();...
0
by: priyankas | last post by:
I am getting this error when doing a SELECT statement . COM.ibm.db2.jdbc.DB2Exception Message is: CLI0 :109E String data right truncation. SQLSTATE=22001 Can anyone help me out with this?
1
by: amarhegde | last post by:
When u perform the SELECT operation, Sometimes u get this error Code java.rmi.RemoteException: ; nested exception is: javax.ejb.EJBException: nested exception is: ...
0
by: Brenda | last post by:
We are on DB2, AIX fixpak 14 This error happens when running PeopleSoft PeopleCode Application Engine process. I have checked other posts out here and it seems like others who have reported...
22
by: Sri | last post by:
All Recenetly our shop migrated to DB2 V8 from V7. We are in IBM System Level: z/OS 1.6.1 @ RSU 0702. Processor : IBM 2064-1C7 (z/900) # 1B89 Mode: 64-bit One of my application is facing...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.