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 > How to set allowNextOnExhaustedResultSet

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-10-12, 06:51
chinu33 chinu33 is offline
Registered User
 
Join Date: Aug 2012
Posts: 3
Post How to set allowNextOnExhaustedResultSet

I am running an JSF application on Tomcat 7 and jdk 6 and using DB2 9.7 as database. I am getting following error:

com.ibm.db2.jcc.am.SqlException: [jcc][t4][10120] [10898][4.11.77] Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null

I came to know if I set 'allowNextOnExhaustedResultSet' property to 1, the prolem gets resolved. Could you tell me how and where I can set this property?

Chinmoy
Reply With Quote
  #2 (permalink)  
Old 08-10-12, 07:31
db2mor db2mor is offline
Registered User
 
Join Date: Apr 2012
Posts: 390
You can set properties either at the connection-level, or at statement-level.
e.g. when you do the DriverManager.getConnection you can pass a Properties object.
See samples provided by IBM in directory sqllib samples java on your DB2-server.
Reply With Quote
  #3 (permalink)  
Old 08-10-12, 07:50
chinu33 chinu33 is offline
Registered User
 
Join Date: Aug 2012
Posts: 3
Can I pass through driver url? If yes the should it be appended with '?' or ';'?
Reply With Quote
  #4 (permalink)  
Old 08-10-12, 08:06
db2mor db2mor is offline
Registered User
 
Join Date: Apr 2012
Posts: 390
Reply With Quote
  #5 (permalink)  
Old 08-13-12, 00:52
chinu33 chinu33 is offline
Registered User
 
Join Date: Aug 2012
Posts: 3
Thanks a lot... It worked after passing the param through driver url.
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