系统Oracle - > Oracle托管

时间:2016-01-21 14:04:48

标签: c# oracle odp.net odp.net-managed

我换了引用但是我收到一个错误,它无法将System.Oracle强制转换为Oracle.ManagedDataAccess

public static DataSet ExecuteDataSetWithTimeOut(string spName, object[] parameterValues)
{
    OracleCommand cmd = new OracleCommand(); 

    cmd.CommandTimeout = 7200;
    cmd.CommandType = CommandType.StoredProcedure;
    cmd.CommandText = spName;
    cmd.Parameters.Add("o_msg", OracleDbType.Varchar2, 300).Direction = ParameterDirection.Output;
    cmd.Parameters.Add("o_shipper_inv", OracleDbType.RefCursor).Direction = ParameterDirection.Output;
    cmd.Parameters.Add("i_start_dt", OracleDbType.Date).Value = parameterValues[2].ToString();
    cmd.Parameters.Add("i_end_dt", OracleDbType.Date).Value = parameterValues[3].ToString();
    cmd.Parameters.Add("i_user_id", OracleDbType.Varchar2).Value = parameterValues[4].ToString();
    cmd.Parameters.Add("i_facility_cd", OracleDbType.Varchar2).Value = null;
    cmd.Parameters.Add("i_shipper_cd", OracleDbType.Varchar2).Value = null;
    return Db.ExecuteDataSet(cmd);
}

0 个答案:

没有答案