Procedure with out parameters

BobGeezer

Member²
Good morning,

The following Delphi cannot call the procedure
below. Please can you point out where we've gone
wrong? It fails with the following error:

--Error-->
ORA-06550: line 2, column 3:
PLS-00306: wrong number or types of arguments in call to 'GET_BOOK_PAGE_NO'
ORA-06550: line 2, column 3: PL/SQL: Statement ignored

var acno: string;
acno := '1234Y';
sp_GetBookPageNo.CallProcedure(
'GET_BOOK_PAGE_NO',
[ 'ACCOUNTNUM', acno,
'BOOKNUM', parInteger,
'PAGENUM', parInteger ]
);

CREATE OR REPLACE PROCEDURE GET_BOOK_PAGE_NO (
ACCOUNTNUM IN VARCHAR2, BOOKNUM OUT INTEGER, PAGENUM OUT INTEGER )
IS
BOOK_PAGE_NO INTEGER;
BEGIN
SELECT BOOKNO, PAGENO, BOOKID
INTO BOOKNUM, PAGENUM, BOOK_PAGE_NO
FROM BOOKNOS
WHERE ACCOUNTNO = ACCOUNTNUM AND BOOKACTIVE = 'Y';
UPDATE BOOKNOS
SET PAGENO = PAGENO + 1
WHERE BOOKID = BOOK_PAGE_NO;
END
;
 
Okay, okay, do I feel stupid?

This is the same old problem we've had before of positional .vs. named parameters.

Default is pmPositional. We use pmNamed.
 
Back
Top