If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > CLI0601E Invalid statement handle

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-09-09, 22:55
makweatan makweatan is offline
Registered User
 
Join Date: Jul 2009
Posts: 8
CLI0601E Invalid statement handle

I've run my Java program in the DB2 server. It returns all values needed but in the end the error below occured :

COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0601E Invalid statement handle or statement is closed. SQLSTATE=S1000

There are no data inserted into the table in the database.

Please tell me what is going on?

Reply With Quote
  #2 (permalink)  
Old 07-10-09, 07:49
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Maybe if you post the DB2 version and OS, along with the code that is causing the problem, you might get some constructive help.

Andy
Reply With Quote
  #3 (permalink)  
Old 07-11-09, 04:23
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Staying on the same level of details: your application has a bug that causes the statement handle to be invalidated. That's why DB2 is giving you this error.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #4 (permalink)  
Old 07-14-09, 21:07
makweatan makweatan is offline
Registered User
 
Join Date: Jul 2009
Posts: 8
Quote:
Originally Posted by ARWinner
Maybe if you post the DB2 version and OS, along with the code that is causing the problem, you might get some constructive help.

Andy
Currently, I am using the Db2 ver 8.2
Server p series.
OS AIX 1.3.

Thank u very much
Reply With Quote
  #5 (permalink)  
Old 07-14-09, 21:09
makweatan makweatan is offline
Registered User
 
Join Date: Jul 2009
Posts: 8
Quote:
Originally Posted by stolze
Staying on the same level of details: your application has a bug that causes the statement handle to be invalidated. That's why DB2 is giving you this error.

Thank u for ur answer.
How can I detect the bug?
Reply With Quote
  #6 (permalink)  
Old 07-14-09, 21:20
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by makweatan
Thank u for ur answer.
How can I detect the bug?
Yoo hawe ollreadee deeteckted ze bahg. Nau yoo nied two ficks ze same.
Reply With Quote
  #7 (permalink)  
Old 07-14-09, 21:31
makweatan makweatan is offline
Registered User
 
Join Date: Jul 2009
Posts: 8
Quote:
Originally Posted by n_i
Yoo hawe ollreadee deeteckted ze bahg. Nau yoo nied two ficks ze same.

Sorry....haha....

what I meant was how to get rid of the bug? Is there any application to do it? I am soo new in DB2....thanks....

Reply With Quote
  #8 (permalink)  
Old 07-15-09, 07:31
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
It might be quite difficult to guess without seeing the code, don't you think? This kind of error generally happens when you close a cursor (explicitly or by a commit) and then try to fetch from it.
Reply With Quote
  #9 (permalink)  
Old 07-15-09, 23:05
makweatan makweatan is offline
Registered User
 
Join Date: Jul 2009
Posts: 8
Quote:
Originally Posted by n_i
It might be quite difficult to guess without seeing the code, don't you think? This kind of error generally happens when you close a cursor (explicitly or by a commit) and then try to fetch from it.

I want to paste the code but it's too long....
Reply With Quote
  #10 (permalink)  
Old 07-17-09, 10:09
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Then reduce the code to a few lines that still exhibit the problem. I guess once you are down to a few dozen lines, you'll find the problem yourself rather quickly.

The alternative is that you start to sprinkle your code with debug information and validate the statement handle at various places. That way, you can narrow down where the handle becomes invalid.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On