PC Review


Reply
Thread Tools Rate Thread

DataReader and DataAdapter relation

 
 
Viswanathan S
Guest
Posts: n/a
 
      28th Jun 2005
Hi All,

I often get the same error when filling data adapter. There is already an
open DataReader associated with this Connection which must be closed first

myda.Fill(newds, "Employee")

But the same type fill command is working in other forms without error.

When filling data adapter it internally opens the executereader but it is
not closing.

How the OledbDataAdapter with fill works? When will it executes the reader.
Why there is a difference in filling with datasets?

Thanks in Advance
______________________________

S. Viswanathan


 
Reply With Quote
 
 
 
 
Miha Markic [MVP C#]
Guest
Posts: n/a
 
      28th Jun 2005
Hi,

Perhaps some other DataReader uses the same connection at the same time?
Note that you have to Dispose DataReaders.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
SLODUG - Slovene Developer Users Group www.codezone-si.info

"Viswanathan S" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All,
>
> I often get the same error when filling data adapter. There is already an
> open DataReader associated with this Connection which must be closed first
>
> myda.Fill(newds, "Employee")
>
> But the same type fill command is working in other forms without error.
>
> When filling data adapter it internally opens the executereader but it is
> not closing.
>
> How the OledbDataAdapter with fill works? When will it executes the
> reader.
> Why there is a difference in filling with datasets?
>
> Thanks in Advance
> ______________________________
>
> S. Viswanathan
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataAdapter.Update Parent->Childs Relation Problem Xusco Microsoft ADO .NET 0 14th Aug 2008 03:39 PM
DataReader and DataAdapter =?Utf-8?B?UGV0ZXI=?= Microsoft ADO .NET 7 8th Aug 2007 10:03 PM
Anyone notice how much faster DataAdapter.Fill() is than DataTable.Load(DataReader)? 0to60 Microsoft ADO .NET 2 5th Jul 2007 01:39 AM
How to read from DataReader and Update using DataAdapter =?Utf-8?B?TW9yaQ==?= Microsoft ADO .NET 3 10th Mar 2005 12:47 PM
Self Referencing parent child relation brick wall on dataadapter.update Jonathan Stone Microsoft ADO .NET 2 25th Jan 2005 03:08 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:51 AM.