How can I get a return value after the Oracle function call?

How can I get a return value after the function call?
Frame work is Delphi XE10 seattle.
Database : oracle , mysql
function return type is dynamic [ string… date… integer … ]
and Call function execute on Middle Tier( important)
please help me. i need example source.

you can use something like inside DA service:

//c: IDASQLCommand;
c := Connection.NewCommand(mysql, stSQL); // or stStoredProcedure if stored procedure should be called
// set input parameters
c.Execute;
// read result 
for i:=0 to c.Params.Count-1 do
  if c.Params[i].ParamType = daptResult then
     myvalue := c.Params[i].Value;
1 Like