473,785 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

string data right truncation

i am using the follwing code to connect to db2 :
java.sql.Connec tion connection = null;
java.sql.Result Set rs = null;

ExperimentJDBCH elperBean jdbchelper =
new ExperimentJDBCH elperBean();

DataSource myDS = ExperimentJDBCH elperBean.getDa taSource();

connection = myDS.getConnect ion();

java.sql.Statem ent stmt = connection.crea teStatement();
and i am getting the following error evne if the table column length is
10 times more than the data sent .if iam sending data like 250 to 280
bytes it is working fine and if iam using more than that i am getting
the follwing error.
please let me know
thanks in advance.

COM.ibm.db2.jdb c.DB2Exception: [IBM][CLI Driver] CLI0109E String data
right truncation. SQLSTATE=22001
at
com.ibm.ejs.con tainer.Containe rManagedBeanO.p ostCreate(Conta inerManagedBean O.java:500)
at
com.ibm.ejs.con tainer.EJSHome. postCreateCommo n(EJSHome.java: 2050)
at com.ibm.ejs.con tainer.EJSHome. postCreate(EJSH ome.java:1953)
at
com.ibm.commerc e.order.objects .EJSCMPOrderPay mentInfoHomeBea n_322c34bb.post CreateWrapper(E JSCMPOrderPayme ntInfoHomeBean_ 322c34bb.java:1 8)
at
com.ibm.commerc e.order.objects .EJSCMPOrderPay mentInfoHomeBea n_322c34bb.crea te(EJSCMPOrderP aymentInfoHomeB ean_322c34bb.ja va:38)
at
com.ibm.commerc e.order.objects .EJSRemoteCMPOr derPaymentInfoH ome_322c34bb.cr eate(EJSRemoteC MPOrderPaymentI nfoHome_322c34b b.java:35)
at
com.ibm.commerc e.order.objects ._OrderPaymentI nfoHome_Stub.cr eate(_OrderPaym entInfoHome_Stu b.java:82)
at
com.ibm.commerc e.order.objects .OrderPaymentIn foAccessBean.<i nit>(OrderPayme ntInfoAccessBea n.java:53)
at
com.ibm.commerc e.order.command s.SetOrderPayme ntInfoCmdImpl.p erformExecute(S etOrderPaymentI nfoCmdImpl.java :97)
at
com.ibm.commerc e.command.ECCom mandTarget.exec uteCommand(ECCo mmandTarget.jav a:133)
at
com.ibm.ws.cach e.command.Comma ndCache.execute Command(Command Cache.java:333)

May 18 '06 #1
2 4885

<ro*****@yahoo. com> wrote in message
news:11******** **************@ u72g2000cwu.goo glegroups.com.. .
i am using the follwing code to connect to db2 :
java.sql.Connec tion connection = null;
java.sql.Result Set rs = null;

ExperimentJDBCH elperBean jdbchelper =
new ExperimentJDBCH elperBean();

DataSource myDS = ExperimentJDBCH elperBean.getDa taSource();

connection = myDS.getConnect ion();

java.sql.Statem ent stmt = connection.crea teStatement();
and i am getting the following error evne if the table column length is
10 times more than the data sent .if iam sending data like 250 to 280
bytes it is working fine and if iam using more than that i am getting
the follwing error.
please let me know
thanks in advance.

[snip]

This is at least the second time in the last few days that you have posted
this question. This time you have given us a few lines of code to go with
the stacktrace you provided the first time, which is probably a step
forward. But there is still not nearly enough information about how you are
storing this data for anyone to make a reasonably solid guess about what
might be wrong.

You haven't said what version of DB2 you are using, what platform you are
on, what program is trying to do the insert, what supporting programs are
being used to move the data or any of many other things that might be useful
in diagnosing your problem. I don't recognize the classes that you are
using, such as "SetOrderPaymen tInfoCmdImpl", or even the first part of the
domain name - com.ibm.commerc e.order - so I suspect that you are using some
kind of add-on IBM package that I don't recognize to do some of the work.
That's the code that seems to be throwing the exception but I can't debug
code from only this very skeletal information.

I think you have one of two problems. Either:
- This IBM product that you are using to pass data to DB2 has a bug in it,
in which case I suggest you contact the support organization for that
product, whatever it is.
-OR-
- This is a case of "garbage in, garbage out". In other words, you are
misusing this package somehow (by accident, not maliciously) and giving it
inappropriate data somehow. In that case, you should be able to find this
yourself by debugging your code and seeing where you are going wrong.

I don't think DB2 is the problem here and I don't think we can be of much
help in solving the problem. DB2 is just the component that is detecting the
problem and telling you that you are overflowing the column.

The only help we might be is if someone on this newsgroup can identify what
product contains the classes that are throwing the exception you are
getting. I certainly don't know but someone else may.
Perhaps you should do a Google search (or Google Groups search) on each
class name until you get an idea where this code originates?
--
Rhino


May 19 '06 #2
thank you ,

May 19 '06 #3

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

Similar topics

3
3390
by: David Sharp | last post by:
I'm working with some long standing VB/SQL Server applications and for the second time we've suffered from having the parameters to a stored procedure call get silently truncated now that the data field has got much larger than when the code was developed all those years ago. This is always very hard to debug and I'd really like SQL Server to throw an error when this happens. I don't feel confident enablying the full ANSI_WARNINGS as it...
9
1558
by: Eric Lilja | last post by:
Hello, consider the following two functions: /* function foo() */ void foo() { float y = 0.0f; float sum = 0.0f; for(int i = 0; i < num; ++i) {
10
49598
by: joel.brewster | last post by:
We have a VB6 application using ADO version 2.5 and I am receiving a " 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
1
60963
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.
37
8550
by: Shri | last post by:
hi all, i am writing a code in which i have a char buffer "cwdir" which hold the current working directory by calling the function getcwd(). later i change the directory to "/" as i have to make my code Deamon. and later again i want to run some other executable available at the path holded by the "cwdir" using the system() system call. presently i concatenate program name (to be executed) to the "cwdir" and use system(chdir)to run the...
5
23679
by: ywchan | last post by:
I would like to convert a string to a fixed length e.g. if fixed length = 10 'abc' -> ' abc' 'abcdefghijklm' -> 'abcdefghij' Is there any simple function in C# can perform this operation? thanks!
9
1541
by: Sean | last post by:
I am using a datagrid to display some data. I notice when I click in a cell where the data is longer than the cell width, it truncates the end of the data off. For example: The data is: This is sample data Column only has room for:
2
6617
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...
0
6559
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)
0
9483
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
10346
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...
1
10096
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9956
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
5386
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
5514
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4055
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
2
3658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2887
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.