KaushaL.NET

Multiple Active Result Sets (MARS – ADO.NET 2.0)

Posted by: Kaushal on: June 30, 2008

Multiple Active Result Sets (MARS) is a feature in ADO.NET 2.0. It allows execution of multiple batches against Database on a single connection. Preeviously, only one batch could be executed at a time against a single connection. But, execution of multiple batches with MARS does not mean like simultaneous execution of operations.

In previous versions of SQL Server; to access multiple result sets using SqlDataReader objects, a separate SqlConnection object must be used with each SqlCommand object. In ADO.NET 2.0 / SQL Server 2005; MARS feature is disabled by default. It can be enabled by adding the “MultipleActiveResultSets=True” keyword pair to your connection string, as below.. Read More…

Leave a Reply

You must be logged in to post a comment.

Victims

  • 39,829 Hits

Calendar

June 2008
M T W T F S S
    Jul »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Archives

KaushaL Parik (Microsoft MVP – ASP.NET)