Mladen Prajdić Blog

Blog about stuff and things and stuff. Mostly about SQL server and .Net

Multiple Active Result Sets

I've written an article about Multiple Active Result Sets (MARS) and it's published on SQLTeam.com

Multiple Active Result Sets is a new SQL Server 2005 feature that, putting it simply, allows the user to run more than one SQL batch on an open connection at the same time.

More here. kick it on DotNetKicks.com

Legacy Comments


Miha Markic
2007-04-03
re: Multiple Active Result Sets
Ehm, a si ti siguren, da si v "Pre-SQL 2005 era" moral zapreti in odpreti povezavo, da si lahko delal z naslednjim čitalcem (readerjem)? Namreč čisto lepo dela tudi brez tega trika, dovolj je, da je aktiven samo enkrat v istem času.

ML
2007-04-04
re: Multiple Active Result Sets
So, there is life on MARS after all... ;)

Miha Markic
2007-04-04
re: Multiple Active Result Sets
"samo enkrat v istem času" => "samo eden istočasno"

Mladen
2007-04-04
re: Multiple Active Result Sets
ej miha a lahko prosim pises komentarje v anglescini?

ja mogoce to ni bil najboljsi primer... bom popravil v 2. delu.
ne mores pa narediti tega:

// meta koda
while (rdr1.Read())
{
rdr2.update
}

in da oba imata isti connection.

Miha Markic
2007-04-04
re: Multiple Active Result Sets
oops, my mistake, don't know why I though to write in slovene.
I was questioning whether one really needs to re-open the connection when dealing with two readers in sequence. Actully you don't need to as long as you don't need two readers at the same time.
No, you can't do the code above (which I never stated btw), nor you can compile it since a reader doesn't have an Update method ;-)

Mladen
2007-04-04
re: Multiple Active Result Sets
that's why i stated it's a meta code.
you know like descriptive :)))


Kiran
2009-10-15
re: Multiple Active Result Sets
Please read this blog post, http://cherupally.blogspot.com/2009/04/imultipleresults-in-linq-not-working-as.html to learn how to read the multiple result sets from database using c# LINQ.