ADO.NET Beta1與Beta2對比

來源:互聯網
上載者:User
ado 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 1 Beta 2 DescriptionSystem.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 1 Beta 2 DescriptionADODataSetCommandOleDbDataAdapterThe 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 Tutorial: Working with OleDb Data Adapters 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 Tutorial: Working with OleDb Data Adapters), 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 mcb@mindcracker.com and help your fellow developers.
Happy .Neting ;).

相關文章

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。