• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

ADO.NET Beta1与Beta2对比

发布: 2007-7-01 11:09 | 作者: admin | 来源: | 查看: 18次 | 进入软件测试论坛讨论

领测软件测试网
ADO.NET 1: Namespaces and Classes

Microsoft has changed many things in its recent .NET Beta 2 release. Most of the code compiled in Beta 1 may not compile in Beta 2. So if you are working on Beta 1, you might want to upgrade it to Beta 2. .NET Beta 2 SDK and VS.NET Beta 2 is available for download on Microsoft@#s MSDN site for MSDN subscribers.
ADO.NET Namespaces
In my first article, I@#ll discuss some of the ADO.NET changes. If you remember Beta 1, there were two common namespaces - System.Data.ADO and System.Data.SQL.  
Beta 1Beta 2Description
System.Data.ADOSystem.Data.OleDbThis namespace contains database classes to work with OLE DB data sources.
System.Data.SQLSystem.Data.SqlClientClasses to work with SQL Server 7.0 or later databases.

ADO.NET Data Components
Besides the namespaces name changes, there are other changes such as Data Components. Most of the data components remain same besides DataSetCommand. In Beta 2, DataSetCommand component is replaced with DataAdapters. DataAdapters sits between a DataSet and a Database and fills data from the data source to the DataSet. Our following articles and sample code will show you how to work with DataAdapters.
Beta 1Beta 2Description
ADODataSetCommandOleDbDataAdapterThe FillDataSet method used to fill a DataSet object from the ADODataSetCommand, which is replaced with Fill method of OleDbDataAdapter.
SQLDataSetCommandSqlDataAdapterThe FillDataSet method used to fill a DataSet object from the SQLDataSetCommand, which is replaced with Fill method of SqlDbDataAdapter.

See my tutorial on DataAdapters for how to write database applications using DataAdapters.
DataSet and DataView components remain same in Beta 2. So that@#s all good since most of the programming revolves around DataSet.
One more component changed in Beta 2 is DataSetView. DataSetView is called DataViewManager. I didn@#t look into the details of DataViewManager but I@#ld think no changes in that class.
Connection and DataAdapters
There is one big change in Beta 2 is working with DataConnection and DataAdapters. If you create DataAdapter application,  (See ), there is no direct connection between Data Adapters and Connection objects. In Beta 1, you could connect a DataSetCommand direct to a Connection object.
In Beta 2, you use DataCommands to connect a Connection object with the Data Adapters. There are four command objects for each INSERT, DELETE, UPDATE, and SELECT SQL queries.
There are more changes but I think its enough for today. Its late and I better go get some sleep otherwise I won@#t be able to work tomorrow ;). May be, Mike or I@#ll write more articles in more depth some other day. There are many other areas to be discussed. Tomorrow, I @#ll try to cover few XML.NET areas. If you think you found something, which is different in Beta 2 than Beta1, just drop me a mail at and help your fellow developers.
Happy .Neting ;).

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备2023014753号-2
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网