Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9
This is the forum to discuss the Wrox book Professional ASP.NET 2.0 Special Edition by Bill Evjen, Scott Hanselman, Devin Rader, Farhan Muhammad, Srinivasa Sivakumar; ISBN: 9780470041789
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 5th, 2007, 06:33 AM
Authorized User
Points: 176, Level: 3
Points: 176, Level: 3 Points: 176, Level: 3 Points: 176, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2006
Location: , , .
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default Listing 12 - 8 "Mars"


Ok Listing 12-8 Exposes a MARS capability.

I don't want any misunderstandings here.
I'm not Sure about you folks, but I had augly troubles with this one.
As I realised from the CodeGuru WebSite, The Mars Capability begins only from the SqlServer 2005 versions.

Now Let me explain a few things.
You will probably receive some ugly error that says:
there's an already open SqlDatareader associated with this Command which must be closed first.

Basically The autors did not speak about the ON/OFF capability of the MARS feature. which anables you to use a Multi SqlDataReaders.
Yes, this capability should work once you Import a namespace called
System.Data.SqlClient. But guess what? It has not worked for me!
Why I have no idea???
anyways you can switch it On/Off by adding a simple attribute to the Connectionstring in your WEb.config file:

True for ON, and False for OFF :)

//----------------Web.Config File----------------------
<connectionStrings>
††<add name="DSN_NorthWind" connectionString="Data Source=user;Initial Catalog=Northwind;Integrated Security=True; MultipleActiveResultSets =True"
†††providerName="System.Data.SqlClient" />

//-----------------------------------------------------


remember Mars works only with the 2005 versions.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Listing 12-13 kai BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 10 September 14th, 2014 05:33 AM
12-19 - MARS - "DBCon does not exist" kazuma BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 4 February 12th, 2008 11:47 AM
Listing 12-1 cJeffreywang BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 3 August 16th, 2007 01:00 PM
Listing 12-1 topm BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 1 March 3rd, 2006 09:53 AM



All times are GMT -4. The time now is 11:46 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.