473,748 Members | 2,496 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Java Exception thrown while Updating/ Inserting CLOB field.

Hi all,

We have files with about 20 to 30 fields per row.

We are trying to update such files with about 60 rows as contiguous
data in a CLOB field.

It passes through.

But when we try updating files with about 60 to 200 rows, we get the
below exception,

[IBM][CLI Driver][DB2/NT] SQL0302N The value of a host variable in the
EXECUTE or OPEN statement is too large for its
corresponding use. SQLSTATE=22001
And When we try updating more than 200 rows, we get the below
exception

[IBM][CLI Driver][DB2/NT] SQL0973N Not enough storage is available in
the "QUERY_HEAP " heap to process the statement.
SQLSTATE=57011

we are using SQLJ to update/ insert the CLOB field.

Any pointers to this ?

Thank you,
Srinadh
Nov 12 '05 #1
1 5961
Srinadh,

The fact that your program behaves differently depending on the number of
rows in the table makes me suspect that there is something wrong in your
program, not in DB2. DB2 should not normally behave differently for 60 rows
than it does for 60,000,000 rows, except that it will take longer for the
program to finish when there is larger number of rows. However, the
behaviour of the individual statements, like an INSERT or UPDATE, shouldn't
change.

Or do you mean 60 *columns*, instead of rows? If you do mean columns instead
of rows, it is possible that you are concatenating too much data together;
remember, there is a limit to the size of a CLOB (2 GB, if I am not
mistaken, but may vary for some platforms and versions of DB2.)

I think we need to see your code to help you figure out this problem.

Can you post your code - or at least the critical part of it - and the
definitions of some of the tables, perhaps a table with less than 60 rows, a
table with 60 to 200 rows, and a table with over 200 rows?

What OS are you using? What version of DB2 are you using?

Also, have you looked at the SQLJ samples in the SQLLIB/samples/Java
directory of DB2? They usually give you a good idea how to do things like
updating/inserting with CLOBs.

Rhino

"Srinadh" <sr*****@gmail. com> wrote in message
news:2e******** *************** ***@posting.goo gle.com...
Hi all,

We have files with about 20 to 30 fields per row.

We are trying to update such files with about 60 rows as contiguous
data in a CLOB field.

It passes through.

But when we try updating files with about 60 to 200 rows, we get the
below exception,

[IBM][CLI Driver][DB2/NT] SQL0302N The value of a host variable in the
EXECUTE or OPEN statement is too large for its
corresponding use. SQLSTATE=22001
And When we try updating more than 200 rows, we get the below
exception

[IBM][CLI Driver][DB2/NT] SQL0973N Not enough storage is available in
the "QUERY_HEAP " heap to process the statement.
SQLSTATE=57011

we are using SQLJ to update/ insert the CLOB field.

Any pointers to this ?

Thank you,
Srinadh

Nov 12 '05 #2

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

Similar topics

4
2372
by: Geoff | last post by:
Hi I'm hoping somebody can help me with the following problem that has occurred to me. Suppose I have two tables in an SQL Server database. Let's call these tables A and B. Assume that A has two fields: a primary key and another holding a string. In table B there are three fields: a primary key, a foreign key (which links to the primary key in A) and other field holding a string.
1
9650
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej and I was wondering if anyone here would be able to give me some tips for young players such as myself, for learning the language. Is this the best Newsgroup for support with JAVA?
1
16231
by: DJ DIGI | last post by:
Hello Everyone, I'm attempting to design a small web app to obtain customer feedback. The issue is when a user inputs >4000 characters in the COMMENTS section I get the following Err Msg: ORA-01704: string literal too long. I am using Visual Studio.Net 2003 (vb as language), SQL+ to create tables in Oracle 9i, and Access to just link and veiw the tables.
4
1997
by: Asfand Yar Qazi | last post by:
Consider the following operation: class C { public: ... virtual void override_me() = 0; struct AnException : public std::runtime_error { AnException(const std::string& arg)
3
2011
by: gimme_this_gimme_that | last post by:
I'm driving Windows XP and could use a tip on installing a function written in Java. 1. I created the a Java jar file, named UdfUtils.jar, from the Java source file shown below: 2. I copied the jar file to c:\Program Files\IBM\SQLLIB\FUNCTION 3. From the db2 command line I exectued call sqlj.refresh_classes() 4. I defined a function using the ddl also shown below Now ...
4
3315
by: Nikki | last post by:
When executing my insert statement, I am receiving the error message 'string literal too long'. The field is an xml datatype and I am inserting the xml as a string. Do I need to convert it to a clob? What else might I need to do? Please advise. Thanks.
8
5010
by: gimme_this_gimme_that | last post by:
I have the following Java code : package com.rhi.bb.udf.utils; import java.sql.Clob; import java.sql.SQLException; import java.util.regex.Pattern; import java.util.regex.Matcher;
2
3981
by: astolpho | last post by:
I am using a slightly outdated reference book on J2EE programming. It gives 2 methods of creating a database used in its casestudies. The first is an ANT script that gives the following output: D:\original\CaseStudy-2-5\CaseStudy\Day02\exercise>asant database Buildfile: build.xml env-user: prop-user: set-user:
2
5667
by: khalidanwar123 | last post by:
i am getting the following error while updating a clob field. ERROR java.sql.SQLException: Data size bigger than max size forthis type: 4003 19:28:27,499 ERROR at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180) 19:28:27,499 ERROR at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222) 19:28:27,499 ERROR at oracle.jdbc.ttc7.TTCItem.setArrayData(TTCItem.java:126) 19:28:27,499 ERROR at...
0
8994
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, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8831
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
9555
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
9250
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
8247
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4607
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...
1
3315
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
3
2215
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.