Skip to Content
0
Former Member
Jun 02, 2016 at 06:13 AM

PB Newbie - Fetch

44 Views

Hi PB Gurus!

I need your expertise again.

I have a fetch statement, it is working fine. I am able to fetch it and put it into a ddlb.

Now, I have a proxy table, I executed my query on the DB painter and it is ok also.

But when I tried a fetch and put it in a ddlb, nothing happens. What am I doing wrong?

Here is my sample code:

connect using SQLCA_PIS;


DECLARE xy CURSOR FOR
SELECT distinct internal_org_unit_name FROM dbo.prxy_org_internal_org order by internal_org_unit_name ;
OPEN xy;
FETCH xy INTO :v_div ;
DO UNTIL sqlca.sqlcode <> 0
ddlb_2.AddItem(v_div);
FETCH xy INTO :v_div;
LOOP
CLOSE xy;

TIA,