Добрый вечер. Почему может не возвращаться результат?
create or replace procedure phone_links (res out clob) as
formonth date default trunc(add_months(sysdate, -1), 'month');
login varchar2(128);
code varchar2(3);
begin
for c in (select conclusion
from invoice
where 1 = 1
and invoice_date = formonth
and thread_id >= 3
group by conclusion) loop
res := res ||
'https://...?login=' ||
login || '&ticket=' || href_hash || chr(13) || chr(10);
end loop;
end;
using (OracleConnection oca = new OracleConnection("..."))
{
oca.Open();
using (OracleCommand ocmd = new OracleCommand())
{
ocmd.Connection = oca;
ocmd.CommandType = System.Data.CommandType.StoredProcedure;
ocmd.CommandText = "phone_links";
ocmd.InitialLOBFetchSize = 8192;
OracleParameter op = new OracleParameter();
op.ParameterName = "res";
op.Direction = ParameterDirection.Output;
op.OracleDbType = OracleDbType.Clob;
ocmd.Parameters.Add(op);
OracleDataReader odr = ocmd.ExecuteReader();
if (odr.HasRows)
rtbLinks.Text = odr.GetOracleClob(0).Value;
else
rtbLinks.Text = "No rows. ";
}
oca.Close();
}