Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
ADO.NET: What's changed in .NET Beta 2?
WhatsApp
Mahesh Chand
4y
8k
0
1
100
Article
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
Description
System.Data.ADO
System.Data.OleDb
This namespace contains database classes to work with OLE DB data sources.
System.Data.SQL
System.Data.SqlClient
Classes 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 the same besides DataSetCommand. In Beta 2, the 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
Description
ADODataSetCommand
OleDbDataAdapter
The FillDataSet method used to fill a DataSet object from the ADODataSetCommand, which is replaced with the Fill method of OleDbDataAdapter.
SQLDataSetCommand
SqlDataAdapter
The FillDataSet method used to fill a DataSet object from the SQLDataSetCommand, which is replaced with the Fill method of SqlDbDataAdapter.
See my tutorial on DataAdapters
Working with OleDb Data Adapters
for how to write database applications using DataAdapters.
DataSet
and
DataView
components remain the 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 a DataAdapter application, (See
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 it's enough for today. It's late and I better go get some sleep otherwise I won't be able to work tomorrow ;). Maybe, 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 a few XML.NET areas. If you think you found something, which is different in Beta 2 than Beta1, just drop me a mail at
[email protected]
and help your fellow developers.
Happy.Neting
ADO.NET
ADO.NET Namespaces
C#
Classes
Data Components
DataCommands
DataSetView
DataView
DataViewManager
namespaces - System.Data.ADO and System.Data.SQL
OleDbDataAdapter
SqlDataAdapter
use DataCommands in beta 2
Whats changed in .NET Beta 2
working with DataConnection and DataAdapters
Up Next
Ebook Download
View all
Printing in C# Made Easy
Read by 22.4k people
Download Now!
Learn
View all
Mindcracker
Founded in 2003, Mindcracker is the authority in custom software development and innovation. We put best practices into action. We deliver solutions based on consumer and industry analysis.
Membership not found