Using VS - DevSource
DevSource: Microsoft Developer Resource DevSource Home Sponsored by Microsoft Home Add Ons Architecture Languages Techniques Using VS Forums
Home arrow Using VS arrow Page 3 - Upgrading Typed DataSets in Visual Studio 2005
Upgrading Typed DataSets in Visual Studio 2005
By Shawn Wildermuth

Rate This Article: Add This Article To:

Upgrading Typed DataSets in Visual Studio 2005 - ' TableAdapters '
( Page 3 of 4 )

TableAdapters

The purpose of TableAdapters is to simplify development. In .NET Framework 1.1, developers were often confused about how DataAdapters and DataSets worked together. By adding TableAdapters to the generated code of Typed DataSet, Microsoft hopes to end some of this confusion.

ADVERTISEMENT

TableAdapters are constructed much like DataAdapters (see Figure 5), but they are type-safe. Interestingly, Microsoft decided that TableAdapters should not derive from DataAdapters by default. They contain a DataAdapter that does most of the work, but the DataAdapter itself is not exposed. When the TableAdapter is created, it (by default) creates GetData, Fill, and Update methods. The GetData method builds a DataTable and returns that DataTable. In contrast, the Fill method fills an existing DataTable (usually contained in a DataSet). The Update method (like DataAdapters) updates a DataRow or entire DataTable.

GetData and Fill methods. You can change these to specify which (or both) to create and rename the methods, as seen in Figure 6:

an option of how to handle this with DataAdapters.)



 
 
>>> More Using VS Articles          >>> More By Shawn Wildermuth
 



HD VOIP Has Arrived (with Tony Konstner)

Play Video >

All Videos >

Google and blonde jokes?

Read now >

Favorite books!

Read now >

View Now
DevSource RSS FEEDS
XML Want an easy way to keep up with breaking tech news? And the Get DevSource headlines delivered to your desktop with RSS.