473,597 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[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 49577
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.c om> wrote in message
news:11******** *************@f 14g2000cwb.goog legroups.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.c om> wrote in message
news:11******** *************@f 14g2000cwb.goog legroups.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.c om> wrote in message
news:11******** *************@f 14g2000cwb.goog legroups.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************ ***********@boi ng.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.c om> wrote in message
news:11******** *************@f 14g2000cwb.goog legroups.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=X XX;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.c om> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.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=X XX;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
(''Ordoez');
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

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

Similar topics

1
60920
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 the problem? Thanks.
0
4908
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 values of two other columns. The problem seems to occur when I check all three conditions. When I have only two of the conditions, the procedure runs to completion and I get a resultset. Interestingly, I created a MS Access database with a...
18
5970
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 the table is define so that one particular column has datatype VARCHAR(2000) . The table was recently modified so that the data type for
2
6613
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 com.ibm.ejs.container.EJSHome.postCreateCommon(EJSHome.java:2050) at com.ibm.ejs.container.EJSHome.postCreate(EJSHome.java:1953) at...
2
4872
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(); DataSource myDS = ExperimentJDBCHelperBean.getDataSource();
0
3176
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
23737
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: com.ibm.db2.jcc.b.SqlException: DB2 SQL error: SQLCODE: -302, SQLSTATE: 22001, SQLERRMC: null
0
6545
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 it seem to be saying their is a problem with the way DB2 is interpreting a string statement with a varchar field. -- 00.03.40 ..(ZZ_EX_NOTS.SendMail.Send3) (PeopleCode)
22
6625
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 problem while testing their code/Jobs in DB2 V8 environments. The Details are: Job is abending with SQLCODE -302 SQL error on the prepare staement. There is no code modification made for many years. It is working fine in db2 V7 enviornments. The...
0
7965
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
7884
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8270
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8380
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8258
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
3880
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3922
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2394
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1493
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.