For the case of returning a single table DataSet in Select, the method has been overloaded, using the most common INNERJOIN connection to return multi-table data related information link: Database layer abstract factory solution archive [continuous upgrade] Database layer abstract factory update 1-- Multi-table connection condition query operation /// /// Multi-table connection condition query operation /// summary> /// Table name group param > /// column name group param> /// condition param> /// conditional query results returns> public static DataSet Select (string [] strTableName, string [] strColumn, string strCondition) {DataSet ds = new DataSet (); Factory factory = Factory.GetInstance (); abstractDbFactory abstractDbFactory = factory.CreateInstance (); IDbConnection concreteDbConn = abstractDbFactory.CreateConnection ( ); concreteDbConn.ConnectionString = abstractDbFactory.GetConnectionString (); concreteDbConn.Open (); IDbCommand concreteDbCommand = abstractDbFactory.CreateCommand (); IDbTransaction concreteDbTrans = abstractDbFactory.CreateTransaction (concreteDbConn); concreteDbCommand.Connection = concreteDbConn; concreteDbCommand.Transaction = concreteDbTrans; IDbDataAdapter concreteDbAdapter = abstractDbFactory.CreateDataAdapter (); try {string strSql = "SELECT"; for (int i = 0; i
For (int i = 0; i