I have a PL/SQL function defined in a package that I had no problem calling via ODP.NET until I overloaded the function. Both function overloads accept two input parameters of type VARCHAR2 and return a VARCHAR2. The two function overload signatures differ only by the name of one of the parameters. This is perfectly legitimate for PL/SQL functions. Both function overloads may be called successfully from SQL*Plus by including the parameter name in the function call. But when I try to call either function overload from my .NET program via ODP.NET, I get the following error:
PLS-00307: too many declarations of '<function name>' match this call
I tried setting OracleCommand.BindByName to true (it is false by default), but that caused the following error:
PLS-00103: Encountered the symbol "@" when expecting one of the following:
( ) - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
table continue avg count current exists max min prior sql
stddev sum variance execute multiset the both leading
trailing forall merge year month day hour minute second
timezone_hour timezone_minute timezone_region timezone_abbr
time timestamp interval date
<a string literal with character set specification>
I am using ODP.NET included in ODAC 11.2 Release 4 (184.108.40.206).
How to call an overloaded PL/SQL function via ODP.NET when the overloaded function parameters differ only by name, not by type?