testing Package from within TOAD

From: Eric Mamet <eric.mamet_at_reuters.com>
Date: 12 Feb 2002 07:58:28 -0800
Message-ID: <e6921888.0202120758.2532a252_at_posting.google.com>



[Quoted] [Quoted] 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 - 16:58:28 CET

Original text of this message