Quantcast
Channel: SCN : All Content - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 2935

DataWindows, Oracle and Arrays: Anyone got this working?

$
0
0

I am trying to use a stored procedure that accepts an array as a parameter as a datawindow data source.  I am receiving an ORA-06550.

 

(2b85c10): PROCEDURE PREPARE: (2b85c10): execute pkg_findtest.getTest;0 an_memberArray = 785145,785146,785147,785148, adtm_effective = TO_TIMESTAMP('1-02-2015 00:00:00','DD-MM-YYYY HH24:MI:SS'), adtm_limit = TO_TIMESTAMP('6-08-2015 23:59:59','DD-MM-YYYY HH24:MI:SS') (3.266 MS / 678.704 MS)

(2b85c10): *** ERROR 6550 ***(rc -1) : ORA-06550: line 1, column 15: PLS-00306: wrong number or types of arguments in call to 'GETTEST' ORA-06550: line 1, column 15: PL/SQL: Statement ignored

(2b85c10): CANCEL: (0.017 MS / 678.721 MS)

 

The package/procedure are defined as:

 

CREATE OR REPLACE PACKAGE pkg_findTest

AS

   TYPE num_tabType IS TABLE OF NUMBER;

   FUNCTION f_getTest(an_Array IN num_tabType, adtm_effective IN date, adtm_limit IN date)

     RETURN SYS_REFCURSOR;

PROCEDURE getTest(an_Array IN num_tabType, adtm_effective IN date, adtm_limit IN date, test_data OUT SYS_REFCURSOR);

END pkg_findTest;

 

------------------------------------------------

CREATE OR REPLACE PACKAGE BODY pkg_findtest AS

   FUNCTION f_getTest(an_Array IN num_tabType, adtm_effective IN date, adtm_limit IN date)

     RETURN SYS_REFCURSOR

   AS

     test_data     SYS_REFCURSOR;

   BEGIN

       OPEN test_data FOR

     SELECT DISTINCT

            data_element1

       FROM test_table

     WHERE data_element2

                IN (SELECT column_value

                                               FROM TABLE(an_Array));

     RETURN test_data;

   END f_getTest;

   PROCEDURE getTest(an_Array IN num_tabType, adtm_effective IN date, adtm_limit IN date, test_data OUT SYS_REFCURSOR)

   AS

   BEGIN

     test_data       := f_getTest(an_Array, adtm_effective, adtm_limit);

   END getTest;

END pkg_findTest;


Viewing all articles
Browse latest Browse all 2935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>