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)