Whidbey System.Data: Some new methods and a class

Since System.Data does not fit into the scope of my BCL talk and I LOVE ADO.NET and LOVE some of the new things in System.Data, I thought I would point them out here quickly for anyone who hasn’t seen it yet.

More user of DataReader
DataSet.GetDataReader
DataSet.LoadfromDataReader
 
So when you want the benefit of minimal stress on your resources(=datareader) yet the ability to pass data objects around (datareader can cause problems), you can now get the best of both worlds. Grab a datareader, shove it into a dataset and go.
 
DataTables are People, Too!!
DataTableReader class
DataTable.Load  (from DataReader)
 
DataTable gets XML
DataTable.ReadXML
DataTable.WriteXML
DataTable.WriteXMLSchema
Oh baby oh baby oh baby! THANK YOU FOR THIS! Need I say more?
 
Merging
DataSet.Merge
DataTable.Merge
These let you pull together datatables, datarows, etc.
 
A little more help with exceptions:
DataAdapterException
 
And for the really meticulous coder
DataSet BeginInit and EndInit
 
If you don’t have whidbey and the help file, you can see some of this stuff in the online longhorn sdk.  Just be sure to note where you are looking at stuff that IS in Whidbey and stuff that is not here until longhorn.
 
I’m so sad because I had to delete these from my deck.

  Sign up for my newsletter so you don't miss my conference & Pluralsight course announcements!  

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.