无法将类型'System.Data.DataSet'隐式转换为'System.Data.DataView? [英] Cannot implicitly convert type 'System.Data.DataSet' to 'System.Data.DataView?

查看:180
本文介绍了无法将类型'System.Data.DataSet'隐式转换为'System.Data.DataView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无法将类型'System.Data.DataSet'隐式转换为'System.Data.DataView。





如何解决它?

Cannot implicitly convert type 'System.Data.DataSet' to 'System.Data.DataView.


How to slove it ?

推荐答案

DataSet是 - 按名称暗示 - 组织成表格的数据集合。

DataView是您的代码查看的方式数据和它是表的属性。

这应该解释为什么你不能在两者之间转换...

没有代码样本很难 - 不可能! - 说出究竟是什么错误,但在全球范围内,你可以做些什么来从DataSet中获取其中一个表的视图 DataSet.Tables [index] .DefaultView [ ^ ]。

要将DataSet从视图中删除,可以使用此DataView.Table.DataSet [ ^ ]
DataSet is - as hinted by name - a collection of data organized into tables.
DataView is the way your code looks on the data and for that it's a property of the tables.
That should explain why you can not convert between the two...
Without code sample is hard - impossible! - to say what exactly wrong, but on a global scale what you can do to get the view of one of the tables out of DataSet is DataSet.Tables[index].DefaultView[^].
To get DataSet out of view you can use this DataView.Table.DataSet[^]


这篇关于无法将类型'System.Data.DataSet'隐式转换为'System.Data.DataView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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