DataTable已经属于另一个数据集 [英] DataTable Already Belongs to another dataset

查看:114
本文介绍了DataTable已经属于另一个数据集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将数据表添加到数据集后,我可以从数据集中断开该数据表吗?

After adding a datatable to a dataset, can i disconnect that datatable from dataset?

推荐答案

最好的办法就是自己尝试一下。

使用Fill方法用数据表填充数据集,然后清除数据表,看看会发生什么。
The best bet would be to try this out yourself.
Use the Fill method to fill a dataset with a datatable and then clear the datatable and see what happens.


试试这个...

http://msdn.microsoft.com/en-us/library/sdc233k4.aspx [ ^ ]
try this...
http://msdn.microsoft.com/en-us/library/sdc233k4.aspx[^]

试试这个

Hi, try this
DatasetName.Tables.Remove(DataTableName);


这篇关于DataTable已经属于另一个数据集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆