public static object GetScalarValue(CommandType cmdType, string cmdText, DbParameter[] dbParam) { SqlParameter[] spParam = ConvertToSqlParameter(dbParam); object objValue = SqlHelper.ExecuteScalar(sqlConnectionstring, cmdType, cmdText, spParam); DbParameter.SetDbParameterValueFromSql(spParam, dbParam); return(objValue); }
public static SqlDataReader GetDataReader(CommandType cmdType, string cmdText, DbParameter[] dbParam) { SqlParameter[] spParam = ConvertToSqlParameter(dbParam); SqlDataReader dReader = SqlHelper.ExecuteReader(sqlConnectionstring, cmdType, cmdText, spParam); DbParameter.SetDbParameterValueFromSql(spParam, dbParam); return(dReader); }
public static DataTable GetDataTable(CommandType cmdType, string cmdText, DbParameter[] dbParam) { SqlParameter[] spParam = ConvertToSqlParameter(dbParam); DataTable dtblTable = SqlHelper.ExecuteDataTable(sqlConnectionstring, cmdType, cmdText, spParam); DbParameter.SetDbParameterValueFromSql(spParam, dbParam); return(dtblTable); }
public static void ExecuteNonQuery(CommandType cmdType, string cmdText, DbParameter[] dbParam) { SqlParameter[] spParam = ConvertToSqlParameter(dbParam); SqlHelper.ExecuteNonQuery(sqlConnectionstring, cmdType, cmdText, spParam); DbParameter.SetDbParameterValueFromSql(spParam, dbParam); }