I have following stored procedure:
create or replace PROCEDURE TEST_REQUEST(
outHTML OUT VARCHAR2,
varParameters IN XMLTYPE)
IS
tmpVar NUMBER;
BEGIN
outHTML :=
'<table><tr><td>Test!</td></tr></table>';
EXCEPTION
WHEN NO_DATA_FOUND
THEN
NULL;
WHEN OTHERS
THEN
-- Consider logging the error and then re-raise
RAISE;
END TEST_REQUEST;
input parameter 'varParameters'=
'<test>
<testid>3DA736A8A4562E053D6</testid>
<testaction>Reject</testaction>
</test>'
And when I call the above stored procedure:
using (OracleConnection connection = new OracleConnection())
{
connection.ConnectionString = this.ConnectionString;
connection.Open();
using (OracleCommand command = new OracleCommand())
{
command.Connection = connection;
command.CommandType = CommandType.StoredProcedure;
command.BindByName = true;
command.CommandText = "TEST_OWNER.TEST_REQUEST ";
OracleParameter outHtml = command.Parameters.Add("outHTML", OracleDbType.Varchar2);
outHtml.Direction = ParameterDirection.Output;
outHtml.Size = Int16.MaxValue;
command.Parameters.Add("varParameters", OracleDbType.XmlType).Value = doc;
command.ExecuteNonQuery();
....
}
connection.Close();
}
Everything works fine when I run it on localhost but once app is remotely published I receive following error:
ORA-06502: PL/SQL: numeric or value error: character string buffer too >small\nORA-06512: at \"TEST_REQUEST \"
I have no clue what might causing the exception. Size of out parameter is set to pretty high, I checked ODAC drivers and everything looks ok. Any ideas?