第一步:建立对象
Dim ds
As DataSet =
New DataSet(
"
dsName
")
Dim dt1 As DataTable = New DataTable
Dim dt2 As DataTable = New DataTable
Dim dt1 As DataTable = New DataTable
Dim dt2 As DataTable = New DataTable
第二步:获取数据,重命名Datatable,两个表添加在ds中
dt1 = GetDate1().Copy //注意复制数据和表结构
dt1.TableName = " dt1 "
ds.Tables.Add(dt1)
dt2 = GetDate2().Copy //注意复制数据和表结构
dt2.TableName = " dt2 "
ds.Tables.Add(dt2)
dt1.TableName = " dt1 "
ds.Tables.Add(dt1)
dt2 = GetDate2().Copy //注意复制数据和表结构
dt2.TableName = " dt2 "
ds.Tables.Add(dt2)