TD array data type with Oracle SP

General discussion forum about all databases other than SqlBase.
ferchou2

TD array data type with Oracle SP

Post by ferchou2 » 04 Jan 2012, 17:30

(My other post is out of place)

Hello,

I try of pass a single dimensional array like parameter to a Oracle Store Procedure. When run the application, I get the follow message: "PL/SQL array vs. scalar mismatch, parameter #1." Do can do this?

Example:

Oracle Code:

SQL> CREATE OR REPLACE TYPE NUM_ARRAY IS VARRAY (6) OF NUMBER;
/

SQL> CREATE OR REPLACE PROCEDURE "TEST" (
aValuesIn in NUM_ARRAY, aValuesOut out NUM_ARRAY )
AS
begin
Hello,

I try of pass a single dimensional array like parameter to a Oracle Store Procedure. When run the application, I get the follow
message: "PL/SQL array vs. scalar mismatch, parameter #1." Do can do this?. I´m using, TD 2005.1

Example:

Oracle Code:

SQL> CREATE OR REPLACE TYPE NUM_ARRAY IS VARRAY (6) OF NUMBER;
/

SQL> CREATE OR REPLACE PROCEDURE "TEST" (
aValuesIn in NUM_ARRAY, aValuesOut out NUM_ARRAY )
AS
begin
For i in aValuesIn.FIRST..aValuesIn.LAST
loop
aValuesOut(i) := aValuesIn(i);
End loop;
end;
/


TD Code:

Windows Variables
Sql Handle: hSqlTest
Number: aValues[ 5 ]
Number: aValuesReturn[ 5 ]


Actions
Call qlPLSQLCommand( hSqlPrueba, 'sys."TEST"( aValores, aValuesReturn) ' )


Very Thanks and Hapy New Years to All.
Fernando.

Jeff Luther

Re: TD array data type with Oracle SP

Post by Jeff Luther » 04 Jan 2012, 20:44

Oracle would not know about TD's internal array (HARRAY) type, so, I do not believe you can do this in TD. I am asking internally if there is a possible way.

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests