我不确定这里发生了什么。突然之间,我很难调用以前很容易调用的存储过程。我得到了以上异常。
当我在sql开发人员中调用它们时,它们工作正常。我是否需要更新连接字符串或dll或其他内容?
更新:已添加代码
if (implemtation == 1)
sProc = "XXX.XXXXX";
else if (implemtation == 2)
sProc = "xxx.xxxxx";
else
throw new Exception(string.Format("Error Determening stored Proc... Stored Proc: {0}",(sProc == "" ? "Empty" : sProc)));
try
{
using (OracleConnection conn = new OracleConnection(ConfigurationManager.ConnectionStrings["ACODBConnectionString2"].ConnectionString))
{
///Not so simple getting Oracle Data back into .Net... However, these code sections do it...
///Consider placing this section into its own method for more a object oriented application... Little time to consider that now however
using (OracleCommand cmd = new OracleCommand(sProc, conn))
{
conn.Open();
cmd.CommandType = CommandType.StoredProcedure;
OracleParameter inputParm = new OracleParameter("XXXXIn", OracleDbType.Decimal);
OracleParameter inputParm2 = new OracleParameter("XXXXIn", OracleDbType.Decimal);
OracleParameter inputParm3 = new OracleParameter("XXXXIn", OracleDbType.Decimal);
inputParm.Value = Double.Parse(PopID);
inputParm2.Value = Double.Parse(History);
inputParm3.Value = Double.Parse(isActive);
OracleParameter outRefParam = new OracleParameter("cur_out", OracleDbType.RefCursor, DBNull.Value, ParameterDirection.Output);
cmd.Parameters.Add(inputParm);
cmd.Parameters.Add(inputParm2);
cmd.Parameters.Add(inputParm3);
cmd.Parameters.Add(outRefParam);
adapter = new OracleDataAdapter(cmd);
adapter.Fill(ds);
//cmd.ExecuteNonQuery();
acoData = SerializeOracleData(ds);
}
}
}
这段相同的代码在几天前就开始运作了。