各位大师救命啊 !!!!
System.Data.OleDb.OleDbException: ORA-01036: 非法的变量名/编号
公共类:
Test.cs
/// <summary>
/// 执行存储过程
/// </summary>
/// <param name= "procName "> 存储过程名称 </param>
/// <param name= "prams "> 存储过程所需参数 </param>
/// <returns> 返回存储过程返回值 </returns>
public int RunProc(string procName, OleDbParameter[] prams)
{
OleDbCommand cmd = CreateCommand(procName, prams);
cmd.ExecuteNonQuery();
this.Close();
return (int)cmd.Parameters[ "ReturnValue "].Value;
}
.......
/// <summary>
/// 生成存储过程参数
/// </summary>
/// <param name= "ParamName "> 存储过程名称 </param>
/// <param name= "DbType "> 参数类型 </param>
/// <param name= "Size "> 参数大小 </param>
/// <param name= "Direction "> 参数方向 </param>
/// <param name= "Value "> 参数值 </param>
/// <returns> 新的 parameter 对象 </returns>
public OleDbParameter MakeParam(string ParamName, OleDbType DbType, Int32 Size, ParameterDirection Direction, object Value)
{
OleDbParameter param;
if(Size > 0)
param = new OleDbParameter(ParamName, DbType, Size);
else
param = new OleDbParameter(ParamName, DbType);
param.Direction = Direction;
if (!(Direction == ParameterDirection.Output && Value == null))
param.Value = Value;
return param;
}
.......
.......
/// <summary>
/// 传入输入参数
/// </summary>
/// <param name= "ParamName "> 存储过程名称 </param>
/// <param name= "DbType "> 参数类型 </param> </param>
/// <param name= "Size "> 参数大小 </param>
/// <param name= "Value "> 参数值 </param>
/// <returns> 新的 parameter 对象 </returns>
public OleDbParameter MakeInParam(string ParamName, OleDbType DbType, int Size, object Value)
{
return MakeParam(ParamName, DbType, Size, ParameterDirection.Input, Value);
}
........
........
/// <summary>
/// 生成存储过程参数
/// </summary>
/// <param name= "ParamName "> 存储过程名称 </param>
/// <param name= "DbType "> 参数类型 </param>
/// <param name= "Size "> 参数大小 </param>
/// <param name= "Direction "> 参数方向 </param>
/// <param name= "Value "> 参数值 </param>
/// <returns> 新的 parameter 对象 </returns>
public OleDbParameter MakeParam(string ParamName, OleDbType DbType, Int32 Size, ParameterDirection Direction, object Value)