Example #1
0
 public static DataSet ExecuteDataset(DBServerType type, string connectionString, string spName, params object[] parameterValues)
 {
     if ((parameterValues != null) && (parameterValues.Length > 0))
     {
         IDbDataParameter[] spParameterset = I3DBHelperParameterCache.GetSpParameterSet(connectionString, spName);
         AssignParameterValues(spParameterset, parameterValues);
         return(ExecuteDataset(type, connectionString, CommandType.StoredProcedure, spName, spParameterset));
     }
     return(ExecuteDataset(type, connectionString, CommandType.StoredProcedure, spName));
 }
Example #2
0
 public static object ExecuteScalar(IDbTransaction transaction, string spName, params object[] parameterValues)
 {
     if ((parameterValues != null) && (parameterValues.Length > 0))
     {
         IDbDataParameter[] spParameterset = I3DBHelperParameterCache.GetSpParameterSet(transaction.Connection.ConnectionString, spName);
         AssignParameterValues(spParameterset, parameterValues);
         return(ExecuteScalar(transaction, CommandType.StoredProcedure, spName, spParameterset));
     }
     return(ExecuteScalar(transaction, CommandType.StoredProcedure, spName));
 }