So i am working on a web service that will obtain data from a database utilizing two functions that make calls to the database. The goal is to have it so that if there is a specific value in one of the parameters lets say
bool x= false;
if ( "Y".Equals( parameterValve, StringComparison.InvariantCultureIgnoreCase ) )
x= true;
if ( x)
cmd.Parameters.Add( "function_call1", OracleType.Cursor ).Direction = ParameterDirection.Output;
else
cmd.Parameters.Add( "function_call2", OracleType.Cursor ).Direction = ParameterDirection.Output;
try
{
grab data here
}
return to webservice
I have all of this setup already and it works fine for the first parameter. However, when i call the webservice using the second parameter call i get this error.
System.Data.OracleClient.OracleException: ORA-06503: PL/SQL:
Function returned without value
ORA-06512: at "database.package", line 103
ORA-06512: at line 1
My question is what exactly is the reason for this error to occur?
Is is because i am calling the function incorrectly or could there be somthing wrong with the function call itself?
Essecentially i’ve been staring at this code for some time now trying to figure out what it is i’ve done incorrectly so i was hoping someone might be able to point me in the right direction of where i should be looking to correct this error.
any help or suggestions are greatly appreciated.
Thanks!
There is something wrong with the function itself.
Somehow, Oracle is getting to the end of the function without returning anything. For example, this function will run successfully if you pass in 1 argument and throw the ORA-6503 error if two arguments are passed in