Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002
    Posts
    8

    Unanswered: java how to invok oracle packeages which return a RecordSet?

    java how to invok oracle packeages which return a RecordSet?

    packeage is

    create or replace package pkgzwTest is
    TYPE myrctype IS REF CURSOR;

    procedure P_zwTest(o_RecordSet OUT myrctype);
    end pkgzwTest;
    create or replace package body pkgzwTest is
    procedure P_zwTest(o_RecordSet OUT myrctype)
    as
    begin
    open o_RecordSet for
    select custname,summary from custinfo;
    return;
    end P_zwTest;
    end pkgzwTest;



    how to return all of the record?

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: java how to invok oracle packeages which return a RecordSet?

    DECLARE
    v_custname custinfo.custname%TYPE;
    v_summary custinfo.summary%TYPE;
    v_cursor pkgzwtest.myrctype;
    BEGIN
    pkgzwtest.P_zwTest( v_cursor );
    LOOP
    FETCH v_cursor INTO v_custname, v_summary;
    EXIT WHEN v_cursor%NOTFOUND;
    /* Process the record - e.g. print it */
    DBMS_OUTPUT.PUT_LINE( v_custname || ':' || v_summary );
    END LOOP;
    CLOSE v_cursor;
    END;
    /

Posting Permissions

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