public static SqlDataReader ExecuteReader(string connectionString, string commandText, params object[] paramValues) { // get parameters and assign values SqlParameter[] procParams = BaseSqlHelper.GetParams(connectionString, commandText); BaseSqlHelper.AssignParams(procParams, paramValues); return(BaseSqlHelper.ExecuteReader(connectionString, commandText, procParams)); }
public static string ExecuteForXml(string connectionString, string commandText, params object[] paramValues) { // get parameters and assign values SqlParameter[] procParams = BaseSqlHelper.GetParams(connectionString, commandText); BaseSqlHelper.AssignParams(procParams, paramValues); // defer execution to overloaded method w/ parameter array return(BaseSqlHelper.ExecuteForXml(connectionString, commandText, procParams)); }
public static void ExecuteNonQuery(string connectionString, string commandText, params object[] paramValues) { // get parameters and assign values SqlParameter[] procParams = BaseSqlHelper.GetParams(connectionString, commandText); BaseSqlHelper.AssignParams(procParams, paramValues); // propagate execution to overloaded method w/ parameter array BaseSqlHelper.ExecuteNonQuery(connectionString, commandText, procParams); return; }