How to display a sys_refcursor data in TOAD's DataGrid

前端 未结 2 704
我寻月下人不归
我寻月下人不归 2021-02-04 13:11

Please i need help. (I SEARCHED A lot and get more confused . )

I use Toad 9.7.25 and i made this procedure (in a package)

PROCEDURE ReportaCC(pfcorte I         


        
2条回答
  •  悲&欢浪女
    2021-02-04 13:40

    After you hit F9 the "Variables" dialog appears and you select Type=Cursor from the dropdown list then press OK:

    Select Type=Cursor

    The reason you are getting the "ORA-24338: statement handle not executed" error is because you are closing your cursor before it is accessed.

    This is the process that is happening:

    1. Execute procedure
    2. OPEN statement returns a pointer to the result set in memory (but does not return any data)
    3. CLOSE statement discards the results before they are accessed
    4. Procedure call ends
    5. The client caller (in this case TOAD) attempts to access the result stream, but the pointer is invalid, so nothing can be read and the error is thrown

    Solution: Remove the close lcursor; statement.

提交回复
热议问题