将UnTyped DataSet合并到Typed DataSet

时间:2012-04-05 21:00:21

标签: strongly-typed-dataset

我在Typed DataSet中有两个数据表 命名为tblA和tblB

注意:表中的数据结构都不同。

让我知道如何将两个无类型数据集合并到上面输入的数据集中。

Dear Tony,
Thanks for your effort. 
But please understand my question.

I have 2 DataTable in Typed DataSet 
DataTable names are: tblA and tblB

Now i have to merge Untyped Dataset one by one.

i need to map and merge.
Like:

UnTypedDATASET.TABLE("TABLEONE")

NOW LET ME KNOW HOW TO MERGE THIS WITH TYPEDDATASET.TABLE("tblA")

i did like this: TypedDataSet.merge(DS.table("tblA"))
but its mapping to tblB instead of tblA

Expecting your valuable help.

2 个答案:

答案 0 :(得分:2)

有解决方案将UNTYPED DATASET与TYPED DATASET合并

Typed_DS.Tables("tblA").Merge(UnTyped_DS.Tables("tablename"), True, MissingSchemaAction.Ignore)

此致 瑟尔。

答案 1 :(得分:0)

myTypedDataset.Merge(myUntypedDataset)

不好笑,但这是两秒钟谷歌。