Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2004

    Unanswered: Fetch in DB2 stored procedure


    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..


  2. #2
    Join Date
    Nov 2004


    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts