IT Community - Software Programming, Web Development and Technical Support

How to solve the SQDataReader not closed problem when excuting another query during i

This is a discussion on How to solve the SQDataReader not closed problem when excuting another query during i within the C# Programming forums, part of the Software Development category; How to solve the SQDataReader not closed problem when executing another query during iterating the reader....


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C# Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-24-2007, 12:28 AM
Archer Archer is offline
D-Web Programmer
 
Join Date: Jun 2007
Posts: 52
Archer is on a distinguished road
Question How to solve the SQDataReader not closed problem when excuting another query during i

How to solve the SQDataReader not closed problem when executing another query during iterating the reader.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-24-2007, 12:30 AM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Default Re: How to solve the SQDataReader not closed problem when excuting another query duri

In order to solve this problem, you have to add 'MultipleActiveResultSets' attribute and set its value to 'true' to the connectionstring in the web.config file.

Ex:
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<connectionStrings>
<add name="myConnection" connectionString="Data Source=.;Database=MyDatabase;User ID=xx;Password=yyyyy; MultipleActiveResultSets=true" providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Treeview control problem: Selected node is not retained when parent node is closed. bluesky ASP and ASP.NET Programming 1 01-23-2008 05:11 AM
Solve the problem, if you possible? velhari C and C++ Programming 3 12-24-2007 03:15 AM
How to solve this problem(The remote server returned an error: (401) Unauthorized.) GDevakii ASP and ASP.NET Programming 0 09-28-2007 11:15 PM
How to solve DVD slow read problems in Windows XP itbarota Computer Hardware 2 08-06-2007 08:51 AM
What are the different problems that “Data mining” can solve? Data warehousing oxygen Database Support 1 07-26-2007 04:37 AM


All times are GMT -7. The time now is 11:32 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0