Visual studio feeds

All Visual Studio blogs in one place

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Google+

Contact

Email:
Subject:
Message:
Anti-spam: How many eyes has a typical person?

Follow us on FB

Search

Using SqlDataReader’s new async methods in .Net 4.5 Beta

AddThis Social Bookmark Button
With the Developer Preview release of .Net 4.5, ADO.NET introduced two asynchronous methods to the SqlDataReader class: ReadAsync and NextResultAsync. These two methods allow you to move to the next row or result set asynchronously and represent a much more fine-grained level of asynchronous access to data compared to .Net 4.0 (which only had asynchronous command execution). However, for the Beta of .Net 4.5 we have gone a step further and introduced two new column-level asynchronous methods:
size="3" color="#0000ff">IsDBNullAsync and GetFieldValueAsync. Flow of Data To understand the need for different levels of asynchronous methods, we need to have a look at how SQL Server sends data to clients like ADO.NET.
Figure 1 - Row data sent from SQL Server via the TDS protocol

 SQL Server sends data to the client using the Tabular Data Stream (TDS) protocol which, as shown in the diagram above, separates each result set with a “DONE” token, each row with...(Read whole news on source site)

Home : Blog List : ADO.NET team blog - Site Home - MSDN Blogs : Using SqlDataReader’s new async methods in .Net 4.5 Beta