public static DataSet LoadDataSet(CacheConfiguration pConfig) { IList <TableConfiguration> tables = pConfig.tables; ADOTemplate template = new ADOTemplate(); DataSet ds = new DataSet(); foreach (TableConfiguration table in tables) { DataTable dataTable = template.Query(table.Sql, null, null, table.DBName); dataTable.PrimaryKey = new DataColumn[] { dataTable.Columns["id"] }; DataTable dt = dataTable.Copy(); dt.TableName = table.TableName; ds.Tables.Add(dt); } return(ds); }
public virtual DataTable ConnectTest() { DataTable dt = template.Query("select * from EGCommonADOTest", null, null); return(dt); }
public virtual DataTable test() { DataTable dt = template.Query("select * from DataConsolidation;", null, null); return(dt); }
public static DataSet LoadDataSet(CacheConfiguration pConfig) { IList<TableConfiguration> tables = pConfig.tables; ADOTemplate template = new ADOTemplate(); DataSet ds = new DataSet(); foreach (TableConfiguration table in tables) { DataTable dataTable = template.Query(table.Sql, null, null, table.DBName); dataTable.PrimaryKey = new DataColumn[] { dataTable.Columns["id"] }; DataTable dt = dataTable.Copy(); dt.TableName = table.TableName; ds.Tables.Add(dt); } return ds; }