Results 1 to 1 of 1
  1. #1
    Join Date
    Jul 2003
    Location
    West Palm Beach FL
    Posts
    5

    Unanswered: Retrieving result set from db2

    From Sequel Server 2005 i am calling a sp on db2 (using linked server). I need to retrieve the result set and having problems doing that. I have been told that the result set may reside in buffer but I am not sure. When I do the select on the temp table it is empty. I know the sp is sucessful because when I use a db2tool (like the iSeries navigator) I get back the full result set. Any ideas????

    Here is the code:

    create table #tempTable (o_drky char(10), o_drdl01 char(50))
    set fmtonly off
    insert into #temptable (o_drky, o_drdl01) Exec ('Call QGPL.get_all_companies (?,?)', o_drky, o_drdl01) AT AS400SRV_IBMDASQL_OLEDB
    select * from #temptable

    Here is my sp on db2:

    create procedure get_all_companies
    (out o_drky char(10),
    out o_drdl01 char(30))
    result set 1
    language sql
    begin
    declare c1 cursor with return for
    select drky, drdl01
    from vgiprdcom/f0005
    where drsy = '00' and drrt = '01';
    open c1;
    set result sets cursor c1;
    end;
    Last edited by snufse; 10-24-07 at 16:15.

Posting Permissions

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