OracleException: ORA-06550 calling function

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
DSergeevich
Posts: 1
Joined: Wed 15 Nov 2017 14:21

OracleException: ORA-06550 calling function

Post by DSergeevich » Wed 15 Nov 2017 14:51

- 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));
}

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: OracleException: ORA-06550 calling function

Post by Shalex » Fri 17 Nov 2017 19:31

We have reproduced the issue and are investigating it. We will notify you about the result.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: OracleException: ORA-06550 calling function

Post by Shalex » Mon 20 Nov 2017 14:44

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));
}

Post Reply