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 > Fetch in DB2 stored procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-17-04, 03:23
Mallik1978 Mallik1978 is offline
Registered User
 
Join Date: Dec 2004
Posts: 1
Fetch in DB2 stored procedure

Hi,

We are using DB2 V6 on os/390. We have a scenario where Java front end will be passing a SQL and the record number from which they want to display the records. Hence,we have created a stored procedure that accepts the sql and record number say 10 prepare the sql and execute the fetch 10 times and give the cursor back to java program. Now java program receives this and traverse the result set successfully but while closing the connection we are getting error 'Communication link failure'.

P.S. If the stored procedure executes fetch only once then we are not getting the above mentioned problem. Anything more than one fetch creates the problem.

It would be great if any one can help us..

Mallik
Reply With Quote
  #2 (permalink)  
Old 12-17-04, 07:02
przytula przytula is offline
Registered User
 
Join Date: Nov 2004
Posts: 374
fetch

so what is the sqlcode / erro code
do you declare cursor / open cursor / fetch.....
Best Regards, Guy Przytula
__________________
Best Regards, Guy Przytula
DB2/ORA/SQL Services
DB2 DBA & Advanced DBA Certified
DB2 Dprop Certified
http://users.skynet.be/przytula/dbss.html
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