最近读《ADO.NET 高级编程》,不甚明白。
书中,有很大篇幅是关于“建立强类型化的DataSet”(*.xsd),我想起以前看的几个例子,好像都没有用到这方面。
忽然想起微软的Duwamish7中继承自DataSet的common层,和上面的“强类型化的DataSet”是不是一回事啊??如果不是,有什么区别?
请哪位高手详细讲解,不胜感激。
谢谢。
书中,有很大篇幅是关于“建立强类型化的DataSet”(*.xsd),我想起以前看的几个例子,好像都没有用到这方面。
忽然想起微软的Duwamish7中继承自DataSet的common层,和上面的“强类型化的DataSet”是不是一回事啊??如果不是,有什么区别?
请哪位高手详细讲解,不胜感激。
谢谢。
解决方案 »
- 怎么样同时插入数据库多条记录
- XMLHttpRequest url路径可以是一般处理程序吗
- 谁能给个只能输入中文英文数字中下划线和空格的正则表达式?要在cs代码里用的
- 救命~vs2005中在html页面写了音乐播放器的代码,怎么不能播放呢?
- string[i]转int
- ==================强烈要求CSND换回原版=================
- VS2008 Team 使用方法
- 使用UpdatePanel后点击浏览器的返回时页面无数据
- 寻找兼职:一个网上订飞机票网站
- 错误提示说是select语句错误,但我怎么看也不像,大家帮帮忙啊??
- 一个用户控件的问题?在线等!!!!分不多望力顶!!!!!各路高手齐相聚了!!!
- 为什么我的treeview无法显示层次?
XSD文件是在VS.NET2003中建立数据集时自动产生的数据架构描述文件
出了数据表外还包括类型、约束等,还可以作为基类派生相关的数据结构
我看过一个例子,是生成派生的XML文件的
就像XSD约束XML一样!
操作
重要的是 比如xsd 对象为 table 只能提示会提示出 所有的字段!!
当然这些字段是你的xsd 那边设置好的!
Another benefit of the DataSet is that it can be inherited to create a strongly typed DataSet. The benefits of a strongly typed DataSet include type checking at design time and the advantage of Microsoft® Visual Studio® .NET statement completion for your strongly typed DataSet. When you have fixed schema or relational structure for your DataSet, you can create a strongly typed DataSet that exposes rows and columns as properties of an object rather than items in a collection. For example, instead of exposing the name column of a row from a table of customers, you expose a Customer object's Name property. A typed DataSet derives from the DataSet class, so that you do not sacrifice any of the DataSet functionality. That is, a typed DataSet can still be remoted and can be supplied as the data source of a data-bound control such as a DataGrid. If schema is not known in advance, you can still benefit from the functionality of a generic DataSet, but you forfeit the additional features of a strongly typed DataSet.
====================================================================
and HOW TO: Create and Use a Typed DataSet by Using Visual C# .NET
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/enu_kbwebdatanetkb/en-us/webdatanetkb/Q320714.htm#3
功能上,类型化数据集将表和表内的列作为对象属性而公开。可以直接通过他们的名称来引用表和列。
而非类型化的数据集就需要分别通过Tables和Item集合来引用表和列。