[Oracle connector] How to create the input and outpur structures?

[Oracle connector] How to create the input and outpur structures?

  
Forge Component
(12)
Published on 2013-04-01 by Francisco Menezes
12 votes
Published on 2013-04-01 by Francisco Menezes
Hi,

I have the following function:

FUNCTION null_date_first
( p_date IN DATE ) RETURN DATE
IS
BEGIN
  RETURN NVL(p_date, TO_DATE('00010101', 'YYYYMMDD'));
END;

I have create a structure foo with 1 attribute: p_date of type Date
the output is a foo-list.

So I am using ToObject(varFoo)
and ToObject(listFoo)

when running the executeFunction I get the following error, what am I doing wrong?
This is with the P9-version, but I assume it's the same in thsi department?

:ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'NULL_DATE_FIRST'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Hi,
The output must be a Record List, not a List, and the name in the output attibute must be RETURN_VALUE.

Hope that helps
It does not help, because P9 Amsterdam doesn't provide that anymore  :(

What P9 Amsterdam doesn't provide?
record lists in the old fashioned way..
but rewriting the code as we speak...
I am a bit confused.

when dumping the OracleCommand parameters, I have 2 parameters, 1 IN, 1 OUT.
yet after the executeNonQuery, the first one is changed., the 2nd is still empty.
which I find very strange?


An old fashioned way.

J. wrote:

Hi,

I have the following function:

FUNCTION null_date_first
( p_date IN DATE ) RETURN DATE
IS
BEGIN
  RETURN NVL(p_date, TO_DATE('00010101', 'YYYYMMDD'));
END;

I have create a structure foo with 1 attribute: p_date of type Date
the output is a foo-list.

So I am using ToObject(varFoo)
and ToObject(listFoo)

when running the executeFunction I get the following error, what am I doing wrong?
This is with the P9-version, but I assume it's the same in thsi department?

:ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'NULL_DATE_FIRST'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

i have also one input in a Oracle procedure without output... and show the same message :(