"ORA-06502:PL/SQL:数字或值错误:字符串缓冲区太小"是虫子吗? [英] "ORA-06502: PL/SQL: numeric or value error: character string buffer too small" is bug?
本文介绍了"ORA-06502:PL/SQL:数字或值错误:字符串缓冲区太小"是虫子吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的asp.net页面中返回"ORA-06502:PL/SQL:数字或值错误:字符串缓冲区太小".
In my asp.net page return "ORA-06502: PL/SQL: numeric or value error: character string buffer too small".
但在蟾蜍中表现不错.
这是我的oracle过程和asp.net代码.
this is my oracle procedure and asp.net code.
CREATE OR REPLACE PROCEDURE FIS.test(res out varchar2)
IS
BEGIN
res := 't430intw2sBn0UQx8WWO0FlsYLcLOPaJ:1R3xHpLiQGw12xXintomQc3oXbiJtvmw';
END test;
-
public String Foo()
{
string queryString = "TEST";
OracleParameter[] parameters =
{
new OracleParameter("OUT_CURSOR", OracleDbType.Varchar2, ParameterDirection.Output)
};
return ExecuteScalar(CommandType.StoredProcedure, queryString, parameters);
}
推荐答案
您需要在此处提供varchar(2)的大小:
You need to give the size of your varchar(2) here:
new OracleParameter("OUT_CURSOR", OracleDbType.Varchar2, ParameterDirection.Output)
类似的东西:
new OracleParameter("OUT_CURSOR", OracleDbType.Varchar2,32767, ParameterDirection.Output)
这篇关于"ORA-06502:PL/SQL:数字或值错误:字符串缓冲区太小"是虫子吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文