<a href="http://www.micropoll.com/akira/mpview/585320-168921">Click Here for Poll</a><a href="http://www.questionpro.com" title="online surveys">Online Survey</a><BR> | <a href="http://www.micropoll.com" title="Website Polls">Website Polls</a><BR> | <BR><a href="http://www.micropoll.com/akira/MicroPoll?mode=html&id=168921">View MicroPoll</A></div>

Visual Studio 2010!

Read now >

Windows Mobile Development Thoughts

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.
ADVERTISEMENT
ADVERTISEMENT

 

DevSource.com: Your Source for Visual Studio on Facebook
ADVERTISEMENT
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.

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 Microsoft Visual Studio Articles          >>> More By Shawn Wildermuth