I am using oracle 11g. My stored procedure is returning varchar2
but its value is being truncated by oracle client
.
Below is my code :
if ((ds != null) && (ds.Tables.Count > 0))
{
foreach (DataRow rw in ds.Tables[0].Rows)
{
OracleParameter param = new OracleParameter((rw["argument_name"]).ToString(), GetOracleType(rw["data_type"].ToString().ToUpper()));
param.Direction = GetParameterDirection((rw["in_out"]).ToString().ToUpper());
discoveryCommand.Parameters.Add(param);
if (param.Direction == ParameterDirection.Output && param.OracleType == OracleType.VarChar)
{
param.Size = 4000;
}
}
}
I increased the param.size
to 4000
but still values are being truncated.
Is there any solution to this. On server I have Oracle 12c. I need to get solution without updating oracle client version in my project as that is not allowed due to some reasons.
Below is the SP . I modified it to return hard-coded values. Still same issue.
PROCEDURE access_level (
p_emp_id IN employees.emp_id%TYPE,
p_id IN NUMBER,
p_type VARCHAR2,
p_access_level OUT VARCHAR2
) IS
BEGIN
p_access_level := 'X' || 'RO' || 'RW';
END IF;