Example #1
0
 public static XmlReader ExecuteXmlReader(OracleTransaction transaction, string spName, params object[] parameterValues)
 {
     if (parameterValues != null && parameterValues.Length > 0)
     {
         OracleParameter[] commandParameters = OracleDataAccessParameterCache.GetSpParameterSet(transaction.Connection.ConnectionString, spName);
         OracleDataAccess.AssignParameterValues(commandParameters, parameterValues);
         return(OracleDataAccess.ExecuteXmlReader(transaction, CommandType.StoredProcedure, spName, commandParameters));
     }
     return(OracleDataAccess.ExecuteXmlReader(transaction, CommandType.StoredProcedure, spName));
 }
Example #2
0
 public static object ExecuteScalar(string connectionString, string spName, params object[] parameterValues)
 {
     if (parameterValues != null && parameterValues.Length > 0)
     {
         OracleParameter[] commandParameters = OracleDataAccessParameterCache.GetSpParameterSet(connectionString, spName);
         OracleDataAccess.AssignParameterValues(commandParameters, parameterValues);
         return(OracleDataAccess.ExecuteScalar(connectionString, CommandType.StoredProcedure, spName, commandParameters));
     }
     return(OracleDataAccess.ExecuteScalar(connectionString, CommandType.StoredProcedure, spName));
 }
        public static OracleParameter[] GetSpParameterSet(string connectionString, string spName, bool includeReturnValueParameter)
        {
            string hashKey = connectionString + ":" + spName + (includeReturnValueParameter ? ":include ReturnValue Parameter" : "");

            OracleParameter[] cachedParameters = (OracleParameter[])OracleDataAccessParameterCache.paramCache[hashKey];
            if (cachedParameters == null)
            {
                cachedParameters = (OracleParameter[])(OracleDataAccessParameterCache.paramCache[hashKey] = OracleDataAccessParameterCache.DiscoverSpParameterSet(connectionString, spName, includeReturnValueParameter));
            }
            return(OracleDataAccessParameterCache.CloneParameters(cachedParameters));
        }
        public static OracleParameter[] GetCachedParameterSet(string connectionString, string commandText)
        {
            string hashKey = connectionString + ":" + commandText;

            OracleParameter[] cachedParameters = (OracleParameter[])OracleDataAccessParameterCache.paramCache[hashKey];
            if (cachedParameters == null)
            {
                return(null);
            }
            return(OracleDataAccessParameterCache.CloneParameters(cachedParameters));
        }
 public static OracleParameter[] GetSpParameterSet(string connectionString, string spName)
 {
     return(OracleDataAccessParameterCache.GetSpParameterSet(connectionString, spName, false));
 }