Skip to Content
0
May 18, 2020 at 10:20 PM

Unable to use Package Procedure with Oracle OLE DB Provider connection in Crystal Reports

88 Views

When I use the "Oracle Provider For OLE DB driver(Database Type: OLE DB (ADO), Provider: OraOLEDB.Oracle)." to bind the Package stored procedure with the Crystal Reports 2013, I am getting the following message. i am using oracle 12.2.0

Database Connector Error: 'ADO Error Code: 0x80040e14 Source: OraOLEDB

Description: ORA-06550: line 1, column 8:

PLS-00306: wrong number or types of arguments in call to 'SP_xxxxxxx'

ORA-06550: line 1, column 8:

PL/SQL: Statement ignored

Native Error: 6550 [Databse Vendor Code: 6550 ]'

But this is the same stored procedure which binds successfully through Oracle Server(Database Type: Oracle Server) connection. But It gives me this error when I use Oracle OLE DB driver My Stored procedure is something like this.

create or replace PACKAGE "SP_xxxxxxx_PKG" AS

TYPE SP_xxxxxxx_TYPE is ref CURSOR; PROCEDURE SP_xxxxxxx

(

p_returncur out SP_xxxxxxx_TYPE -- Ref cursor pkg ,

lApcasekey in int ,

lReportType in int ,

szLogType in varchar

);

end sp_xxxxxxxx_pkg;

/

create or replace PACKAGE BODY "SP_xxxxxxx_PKG" is

PROCEDURE SP_xxxxxxx

( p_returncur out SP_xxxxxxx_TYPE -- Ref cursor pkg ,

lApcasekey in int ,

lReportType in int ,

szLogType in varchar

) AS

BEGIN

OPEN p_returncur for -- The cursor from the parameter list must be opened

select COLUMN_NAME as APCASEKEY from SCHEMANAME.TABLE_NAME where COUMN_NAME = lApcasekey;

IF lReportType = 1 THEN

BEGIN

---* INSERT OPERATION

END;

END IF;

END SP_xxxxxxx;

END SP_xxxxxxx_PKG;