*** Test 1 *** SQL Cmd: {call GetPermits.ReturnCursor('LA0006335');} Error #: 1526 Msg 1 : Connectivity error: [Microsoft][ODBC driver for Oracle]Syntax error or access violation Msg 2 : [Microsoft][ODBC driver for Oracle]Syntax error or access violation Msg 3 : 37000 *** Test 2 *** SQL Cmd: {call GetPermits.ReturnCursor('LA0006335')}; Error #: 1526 Msg 1 : Connectivity error: [Microsoft][ODBC driver for Oracle][Oracle]ORA-06550: line 1, column 48: PLS-00103: Encountered the symbol ";" The symbol ";" was ignored. Msg 2 : [Microsoft][ODBC driver for Oracle][Oracle] ORA-06550: line 1, column 48:PLS-00103: Encountered the symbol ";" The symbol ";" was ignored. Msg 3 : 37000 *** Test 3 *** SQL Cmd: {call GetPermits.ReturnCursor('LA0006335')} Error #: 1526 Msg 1 : Connectivity error: [Microsoft][ODBC driver for Oracle][Oracle]ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'RETURNCURSOR' ORA-06550: line 1, column 7:PL/SQL: Statement ignored Msg 2 : [Microsoft][ODBC driver for Oracle][Oracle]ORA-06550: line 1, column 7:PLS-00306: wrong number or types of arguments in call to 'RETURNCURSOR'ORA-06550: line 1, column 7:PL/SQL: Statement ignored Msg 3 : 37000 *** Test 4 *** SQL Cmd: call GetPermits.ReturnCursor('LA0006335'); Error #: 1526 Msg 1 : Connectivity error: [Microsoft][ODBC driver for Oracle][Oracle]ORA-00911: invalid character Msg 2 : [Microsoft][ODBC driver for Oracle][Oracle]ORA-00911: invalid character Msg 3 : 37000 *** Test 5 *** SQL Cmd: call GetPermits.ReturnCursor('LA0006335') Error #: 1526 Msg 1 : Connectivity error: [Microsoft][ODBC driver for Oracle][Oracle]ORA-06553: PLS-306: wrong number or types of arguments in call to 'RETURNCURSOR' Msg 2 : [Microsoft][ODBC driver for Oracle][Oracle]ORA-06553: PLS-306: wrong number or types of arguments in call to 'RETURNCURSOR' Msg 3 : NA000No matter what my syntax is, an error is returned.Since the cursor is defined in the package appears as the first parameter, would this be why I get the error? This should not be that difficult. TIA!
CREATE OR REPLACE PACKAGE GetPermits AS Type RetCursor Is Ref Cursor; Procedure ReturnCursor(pCursor OUT RetCursor, c_pmt IN char); END; / show error CREATE OR REPLACE PACKAGE BODY GetPermits AS Procedure ReturnCursor(pCursor OUT RetCursor, c_pmt IN char) is Begin open pCursor for select * from npdes.permits where permit_num = c_pmt; End; END; / show error