(5)DataSet

 

 DataTable赋值给DataSet

DataSet ds = new DataSet();
DataTable dt1 = new DataTable();
DataTable dt2 = new DataTable();
dt1 = OracleDB.QueryDt(sql, Conn);
dt1.TableName = "table1";//赋值以后再重命名默认表名为ds          
dt2 =OracleDB.QueryDt(sql, Conn);
dt2.TableName = "table2";
ds.Tables.Add(dt1.Copy());
ds.Tables.Add(dt2.Copy());

 

posted @ 2018-01-25 15:54  富坚老贼  阅读(160)  评论(0编辑  收藏  举报