[Oracle Connector P9] cannot get a value back from oracle function

[Oracle Connector P9] cannot get a value back from oracle function

  
Forge Component
(3)
Published on 2015-03-13 by Grazina
3 votes
Published on 2015-03-13 by Grazina
i've installed P9 version and used code sample in eSpaceTeste v8 to try to get it to work. However when i set the output parameter to type Record i get an error. 

Unable to cast object of type 'ssPOSSEDeltaReset.RCBizTalkErrorRecord' to type 'OutSystems.HubEdition.RuntimePlatform.Db.RecordList'

I changed the outPut type to RecordList and now the code runs BUT i'm not getting back any values. the output is always blank. Here's my simplified function that works when i run it in sql developer.

FUNCTION     fnGetDeltaTableErrorCount
        (
         TableName VARCHAR2
        )
        RETURN VARCHAR2
AS
        ErrorCount VARCHAR2(10);
BEGIN
    ErrorCount := '5';      
    RETURN ErrorCount;
END fnGetDeltaTableErrorCount;

Any help would be greatly appreciated. Also an example that uses a procedure that returns a SYS_REFCURSOR would really be helpful.

Thank you.
Hiya,

I found the issue myself as well.

problem lies in the fact, the OracleManager assumes the returnvalue to be the first of the parameters!
so, when you provide input-parameters as the first parameters, some will be overwritten.

In my case, I created an simpler function-variant, that simply returns a text.
this parameter will be added as the first one to the command.

Version 0.1.3 added a fix for this, can you try it?

Thanks

Fabian wrote:
i've installed P9 version and used code sample in eSpaceTeste v8 to try to get it to work. However when i set the output parameter to type Record i get an error. 

Unable to cast object of type 'ssPOSSEDeltaReset.RCBizTalkErrorRecord' to type 'OutSystems.HubEdition.RuntimePlatform.Db.RecordList'

I changed the outPut type to RecordList and now the code runs BUT i'm not getting back any values. the output is always blank. Here's my simplified function that works when i run it in sql developer.

FUNCTION     fnGetDeltaTableErrorCount
        (
         TableName VARCHAR2
        )
        RETURN VARCHAR2
AS
        ErrorCount VARCHAR2(10);
BEGIN
    ErrorCount := '5';      
    RETURN ErrorCount;
END fnGetDeltaTableErrorCount;

Any help would be greatly appreciated. Also an example that uses a procedure that returns a SYS_REFCURSOR would really be helpful.

Thank you.