Page 1 of 1

OracleException: ORA-06550 calling function

Posted: Wed 15 Nov 2017 14:51
by DSergeevich
- dotconnect for oracle 9.4.348
When I call a function from a package, I get an error OracleException: ORA-06550

https://imgur.com/gndTFNM

Code: Select all

CREATE OR REPLACE PACKAGE BODY USER_SETUP.PROCESSING_MESSAGES
IS
    function get_statistics_pm(date_point IN date)
        RETURN SYS_REFCURSOR
    IS
        l_cursor   SYS_REFCURSOR;
    BEGIN
        OPEN l_cursor FOR
            select t.name_type, t.descriptions,
                sum(case when (r.state not in (-1, 0)) then 1 else 0 end) as count_success,
                sum(case when (r.state in (-1, 0)) then 1 else 0 end) as count_error
        from bc_request_list r
            left join BC_TYPE_REQUEST t on t.id = r.type_request
        where TRUNC(r.date_stamp) = date_point
        group by t.name_type, t.descriptions;

        RETURN l_cursor;
    END;
END;

Code: Select all

/// <summary>
/// There are no comments for GetStatisticsPm in the schema.
/// </summary>
[Function(Name=@"USER_SETUP.PROCESSING_MESSAGES.GET_STATISTICS_PM")]
internal Devart.Data.Linq.ISingleResult<StatisticsPm> GetStatisticsPm([Parameter(Name="DATE_POINT", DbType="DATE")] System.Nullable<System.DateTime> DATE_POINT)
{
            IExecuteResult _GetStatisticsPmResult = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), DATE_POINT);
            return ((Devart.Data.Linq.ISingleResult<StatisticsPm>)(_GetStatisticsPmResult.ReturnValue));
}

Re: OracleException: ORA-06550 calling function

Posted: Fri 17 Nov 2017 19:31
by Shalex
We have reproduced the issue and are investigating it. We will notify you about the result.

Re: OracleException: ORA-06550 calling function

Posted: Mon 20 Nov 2017 14:44
by Shalex
Please add the ResultType attribute to the method definition:

Code: Select all

[Function(Name=@"USER_SETUP.PROCESSING_MESSAGES.GET_STATISTICS_PM")]
[ResultType(typeof(GETSTATISTICSPMResult), 1, ResultTypeOrigin.ReturnValue)]
internal Devart.Data.Linq.ISingleResult<StatisticsPm> GetStatisticsPm([Parameter(Name="DATE_POINT", DbType="DATE")] System.Nullable<System.DateTime> DATE_POINT)
{
            IExecuteResult _GetStatisticsPmResult = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), DATE_POINT);
            return ((Devart.Data.Linq.ISingleResult<StatisticsPm>)(_GetStatisticsPmResult.ReturnValue));
}