I have sample firebird stored procedure
PROCEDURE PROCEDURE01
RETURNS (
PARAMETER01 VARCHAR(50))
AS
BEGIN
PARAMETER01 = 'Hello';
END
and in the Delphi side
LCommand := SQLConnection1.DBXConnection.CreateCommand;
LCommand.CommandType := TDBXCommandTypes.DbxStoredProcedure;
LCommand.Text := 'PROCEDURE01';
LIdOut := LCommand.CreateParameter;
LIdOut.ParameterDirection := TDBXParameterDirections.OutParameter;
LIdOut.DataType := TDBXDataTypes.WideStringType;
LIdOut.Name := 'PARAMETER01';
LCommand.Parameters.AddParameter(LIdOut);
LCommand.Prepare;
LReader := LCommand.ExecuteQuery;
and receive exception
"Arithmetic exception, numeric overflow, or string truncation"