Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Value of host variable in EXECUTE or OPEN is too large !

0 views
Skip to first unread message

global

unread,
Jun 4, 2003, 9:01:38 AM6/4/03
to
I've got this error while updating 4 columns of a table (with more
than 70 columns)

javax.ejb.EJBException: nested exception is:
COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2] SQL0302N Der
Wert einer Host-Variablen in der Anweisung EXECUTE oder OPEN ist zu
groß. SQLSTATE=22001

COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2] SQL0302N Der
Wert einer Host-Variablen in der Anweisung EXECUTE oder OPEN ist zu
groß. SQLSTATE=22001

How can I find out which attribute causes this error.
But I don't believe this error message because I already checked all
values and ranges of the attributes.
May be a caching problem ! has anybody such problem or has idea for me
?
Thanks

Our environment:
zOS/UDB V7.1
Websphere WSAD Version 5.0.0.2 Build id:20030218. on NT

Cevdet Dal

unread,
Jun 4, 2003, 9:08:25 AM6/4/03
to
is there a 'NULL' value?


"global" <anh.d...@dak.de>, haber iletisinde sunlari
yazdi:95b5b24d.03060...@posting.google.com...

Rhino

unread,
Jun 4, 2003, 11:50:14 AM6/4/03
to
You haven't posted the SQL statement which failed so it is hard to be sure
but I strongly suspect that your error message is telling you exactly what
is wrong: one of the values in the SET clause of your update statement is
too large.

For example, if one of the columns being updated is called EMPNO and it is
defined as SMALLINT, you will get the error you describe if you try to set
EMPNO = 50000. The capacity of a SMALLINT is +/- 32K so if you try to set
the column to a value beyond that range, you will get the SQL0302N error.

Here's what you'll need to do:
1. Determine what value you are assigning to each of the 4 columns in your
update statement.
2. Determine the datatype of each of those 4 columns via the Control Center
or a catalog query.
3. Look up the capacity of each of the datatypes you are using in those 4
columns in the SQL Limits appendix of the SQL Reference for your platform.
4. Compare the limits for each datatype that you are using with the values
you are actually trying to set in those columns. You will almost certainly
find that at least one of them is being given a value that is beyond its
range.
5. Adjust the SET clause of your UPDATE statement to set the value of the
column to something within its range --OR-- if the value being set is
correct, redefine the column to use a datatype that has the appropriate
capacity for the value you are trying to store.

Rhino

"global" <anh.d...@dak.de> wrote in message
news:95b5b24d.03060...@posting.google.com...

PM (pm3iinc-nospam)

unread,
Jun 4, 2003, 2:35:04 PM6/4/03
to
any concat() or || in your sql?
any constants?
any computations? (implicit casts)
any grouping functions?
etc...

PM


0 new messages