Re: testing Package from within TOAD

From: damorgan <dan.morgan_at_ci.seattle.wa.us>
Date: Tue, 12 Feb 2002 17:15:01 GMT
Message-ID: <3C694D97.17A2108F_at_ci.seattle.wa.us>


I don't know whether you can, or not, but it is a very bad idea. If you want to test a procedure ... execute it from the SQL*Plus command line.

Daniel Morgan

Eric Mamet wrote:

> I want to use Procedures returning references to cursors from within
> ASP or Vbscript environments.
>
> To make sure everything is fine with the procedure, I'd like to "test"
> it manualy from within TOAD.
> Can I do that for this sort of procedure?
> Could you show me a sample script?
>
> Regards
>
> Eric
>
> See below a procedure example taken from the Microsoft MSDN
> PACKAGE curspkg_join AS
> TYPE t_cursor IS REF CURSOR ;
> Procedure open_join_cursor1 (n_EMPNO IN NUMBER, io_cursor IN OUT
> t_cursor);
> END curspkg_join;
>
> PACKAGE BODY curspkg_join AS
> Procedure open_join_cursor1 (n_EMPNO IN NUMBER, io_cursor IN OUT
> t_cursor)
> IS
> v_cursor t_cursor;
> BEGIN
> IF n_EMPNO <> 0
> THEN
> OPEN v_cursor FOR
> SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME
> FROM EMP, DEPT
> WHERE EMP.DEPTNO = DEPT.DEPTNO
> AND EMP.EMPNO = n_EMPNO;
> ELSE
> OPEN v_cursor FOR
> SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME
> FROM EMP, DEPT
> WHERE EMP.DEPTNO = DEPT.DEPTNO;
> END IF;
> io_cursor := v_cursor;
> END open_join_cursor1;
> END curspkg_join;
Received on Tue Feb 12 2002 - 18:15:01 CET

Original text of this message