This happens when you try to read a cursor after fetching data from it. Try to read the cursor before you fetch data from it
PROCEDURE GetAffiliateCouriers(paffiliate_id number, io_cursor IN OUT appCursor)
IS
vcursor appCursor; tcursor appCursor; retCursor appCursor;
affiliate_id INTEGER; t_allow_courier_selection INTEGER;
v_row AFFILIATE%ROWTYPE; t_row AFFILIATE_COURIER%ROWTYPE;
BEGIN
vcursor := NULL;
tcursor := NULL;
affiliate_id := paffiliate_id;
LOOP
OPEN vcursor FOR SELECT * FROM affiliate WHERE id = affiliate_id AND allowcourierselection = 1;
FETCH vcursor INTO v_row;
IF (vcursor%FOUND) THEN
OPEN tcursor FOR SELECT * FROM affiliate_courier WHERE affiliate_courier.fk_affiliate_id = affiliate_id;
FETCH tcursor INTO t_row;
IF (tcursor%FOUND) THEN
OPEN retCursor FOR SELECT * FROM affiliate_courier WHERE affiliate_courier.fk_affiliate_id = affiliate_id;
io_cursor := retCursor;
RETURN;
END IF;
END IF;
SELECT fk_parent_id INTO affiliate_id FROM affiliate WHERE affiliate.id = affiliate_id;
EXIT WHEN affiliate_id IS NULL;
END LOOP;
io_cursor := retCursor;
END GetAffiliateCouriers;
Subscribe to:
Post Comments (Atom)
Azure Storage Account Types
Defferent Types of Blobs Block blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually...
-
Why we need asynchronous tasks? Execute a time consuming operations in parallel to the CLR thread which execute the request If you have ...
-
Demo: I was thinking a way to show images before actually uploading them to server. I would say to preview images using javascript. Obv...
No comments:
Post a Comment