DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Initilize the reference cursor

  1. #1
    Join Date
    Aug 2000
    Location
    Shanghai
    Posts
    433
    I have a package and in the package specification , I define a reference cursor type and in the package body I will use define a reference cursor variable based on this reference cursor type and open it .
    My question is : Do I need to initialize it everytime in the beginning of package body and How to initialize is reference cursor variable ?

    1. www.dbasupport.com
    2. www.dbforums.com
    3. www.itpub.net
    4. www.csdn.net
    5. www.umlchina.com
    6. www.tek-tips.com
    7. www.cnforyou.com
    8. fm365.federal.com.cn
    9. www.programmersheaven.com
    10.http://msdn.microsoft.com/library/default.asp
    ligang1000@hotmail.com

  2. #2
    Join Date
    Apr 2002
    Location
    Shenzhen, China
    Posts
    327
    You need not to initialize it at all.

    You can use it directly in following way.

    DECLARE c1 YOUR_PACKAGE.YOUR_REF_CUR_TYPE;
    BEGIN
    ...
    OPEN c1 FOR ...
    ...
    END;


    Please correct me if I am wrong.
    Oracle Certified Master - September, 2003, the Second OCM in China
    *** LOOKING for PART TIME JOB***
    Data Warehouse & Business Intelligence Expert
    MCSE, CCNA, SCJP, SCSA from 1998

  3. #3
    Join Date
    Aug 2000
    Location
    Shanghai
    Posts
    433
    I would agree with you if it is inside a function . I think package is different story .
    1. www.dbasupport.com
    2. www.dbforums.com
    3. www.itpub.net
    4. www.csdn.net
    5. www.umlchina.com
    6. www.tek-tips.com
    7. www.cnforyou.com
    8. fm365.federal.com.cn
    9. www.programmersheaven.com
    10.http://msdn.microsoft.com/library/default.asp
    ligang1000@hotmail.com

Posting Permissions

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


Click Here to Expand Forum to Full Width