Hi,
I'm using PB2022, build 1900 with Oracle 19 database.
My question has to do with overloading and calling functions in a Oracle package. In native PB (Desktop) all works fine but with PowerServer there are issues.
Here is my test case. The package is TEST and it has two funtions
FUNCTION F_get_lucky
RETURN number IS
begin
RETURN 777;
END;
FUNCTION F_get_lucky(p_number in number)
RETURN number IS
begin
RETURN p_number;
END;
In the application SQLCA these are defined as
function long f_get_lucky() RPCFUNC ALIAS FOR "test.f_get_lucky"
function long f_get_lucky(Long LuckyNumber ) RPCFUNC ALIAS FOR "test.f_get_lucky"
When calling the function from the app using e.g.
MessageBox("f_get_lucky", sqlca.f_get_lucky())
This the error message I get in the PowerServer console window.
"ErrorMessage": "ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to 'F_GET_LUCKY'\nORA-06550: line 1, column 7:\nPL/SQL: Statement ignored"
When calling a non-overloaded version of the function, all works fine.
Is it so that PowerServer doesn't not suport this type of overloading or should I do things differently?
Thanks,
Kari
As a workaround, I would suggest creating an "interface" DB function that includes all possible arguments. Then internally within the Oracle DBMS that function could then call the overloaded functions as required. HTH
Regards... Chris
This is a pity as everything else was working quite fine.