It's not a secret anymore!
The moose likes Websphere and the fly likes BatchUpdateException: [IBM][CLI Driver][DB2/LINUX] SQL0302N Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "BatchUpdateException: [IBM][CLI Driver][DB2/LINUX] SQL0302N " Watch "BatchUpdateException: [IBM][CLI Driver][DB2/LINUX] SQL0302N " New topic

BatchUpdateException: [IBM][CLI Driver][DB2/LINUX] SQL0302N

Karthikeyan Rajendraprasad
Ranch Hand

Joined: Apr 16, 2003
Posts: 70
BatchUpdateException: [IBM][CLI Driver][DB2/LINUX] SQL0302N The value of a host variable in the EXECUTE or OPEN statement is too large for its corresponding use. SQLSTATE=22001
the problem is like this. we have application that loads data from an UNL file into the db2 database. the process is like we load using prepared statement and batch update option. the file we load has 3 lakh records. the problem occurs exactly at the 1,68,560 record. we load as a bach of 10 records. when we use update and load record by record i am able to load all the 3lakh records successfully. we thought there might be an issue with the driver because the same problem occured in the same place in 2 other db2 servers. so we thought we can get the latest version of the driver and test it.
thanks and regards

Karthikeyan<br />SCJP 1.4, SCWCD.
Nagendra Prasad
Ranch Hand

Joined: Jul 11, 2002
Posts: 219
I am afraid not.. something on the record u mention has a data field length that is greater than what is allowed in your databaase.
Check the data values in that record with the field length allowed in the table. I suspect you will find the answer there.

Best Regards,<br />Nagendra Prasad.
Karthikeyan Rajendraprasad
Ranch Hand

Joined: Apr 16, 2003
Posts: 70
the problem is not with the data. as i have mentioned in my post the problem occurs when we use batch update. if i load it line by line in dont have any problem.
i am 100% sure that there should be no problem with the data because it is generated by a reporting module.
Jaydeep S. Deshmukh

Joined: Jun 22, 2006
Posts: 1
Hi karthi,

Definitely the problem is with the application. I am facing same problem for which I tried to access NET but seems very obscure/profound. There must be something which is not understable by DB, may be some non-printable / special characers etc.
Try out openssl may help you /.... as somebody told to me...even I am also not aware of the same... let's hope for the best
I agree. Here's the link:
subject: BatchUpdateException: [IBM][CLI Driver][DB2/LINUX] SQL0302N
It's not a secret anymore!