Esempio n. 1
0
        public static OracleDataReader ExecuteReader(OracleTransaction transaction, string spName, params object[] parameterValues)
        {
            //if we receive parameter values, we need to figure out where they go
            if ((parameterValues != null) && (parameterValues.Length > 0))
            {
                OracleParameter[] commandParameters = OracleDataAccessParameterCache.GetSpParameterSet(transaction.Connection.ConnectionString, spName);

                AssignParameterValues(commandParameters, parameterValues);

                return(ExecuteReader(transaction, CommandType.StoredProcedure, spName, commandParameters));
            }
            //otherwise we can just call the SP without params
            else
            {
                return(ExecuteReader(transaction, CommandType.StoredProcedure, spName));
            }
        }
Esempio n. 2
0
        public static XmlReader ExecuteXmlReader(OracleTransaction transaction, string spName, params object[] parameterValues)
        {
            //if we receive parameter values, we need to figure out where they go
            if ((parameterValues != null) && (parameterValues.Length > 0))
            {
                //pull the parameters for this stored procedure from the parameter cache (or discover them & populate the cache)
                OracleParameter[] commandParameters = OracleDataAccessParameterCache.GetSpParameterSet(transaction.Connection.ConnectionString, spName);

                //assign the provided values to these parameters based on parameter order
                AssignParameterValues(commandParameters, parameterValues);

                //call the overload that takes an array of OracleParameters
                return(ExecuteXmlReader(transaction, CommandType.StoredProcedure, spName, commandParameters));
            }
            //otherwise we can just call the SP without params
            else
            {
                return(ExecuteXmlReader(transaction, CommandType.StoredProcedure, spName));
            }
        }