Re: There is already an open DataReader associated with this Connection which must be closed first



First, you'll get more interest in this ADO.NET question on the ADO.NET
list. Use microsoft.public.dotnet.framework.adonet instead.
Next, we see this problem when using the DataReader in addition to Fill to
populate a DataSet. We can also see it if the Fill has not completed for
some reason--as when it cannot populate rows as they are locked. You say
you're using the OleDb classes. What database are you accessing? Are you
trying to access the same database from more than one thread/form at a time?

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

"Viswanathan S" <visu@xxxxxxxxxxxx> wrote in message
news:%23c%23sXlweFHA.2124@xxxxxxxxxxxxxxxxxxxxxxx
> 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
>
>


.



Relevant Pages

  • Re: Async process - Start Subroutine when finished
    ...     End Sub ... During Async process I'll populate a OleDBDatareader declared as ... Datareader was populated fine, but is not possible to access it from ...
    (microsoft.public.dotnet.languages.vb)
  • Re: new to collections
    ... "Kevin Spencer" wrote: ... > Don't worry, rodchar, I haven't missed your point. ... > fastest (DataReader) you can only read forward, and one record at a time. ... > the scenes to create an object, populate it, and add it to a Collection (The ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Async process - Start Subroutine when finished
    ... a private class variable so you can access it's EndInvoke method. ... During Async process I'll populate a OleDBDatareader declared as ... Datareader was populated fine, but is not possible to access it from ...
    (microsoft.public.dotnet.languages.vb)
  • Re: new to collections
    ... fastest (DataReader) you can only read forward, and one record at a time. ... the scenes to create an object, populate it, and add it to a Collection (The ... In some cases, it may be useful to populate a custom Collection, rather than ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Dataset or datareader
    ... used to populate the DropDownList Controls. ... certainly gain some performance by initializing them using a DataReader ... Nyuck nyuck nyuck ... I have a form with 4 dropdownlist controls which I populate with data ...
    (microsoft.public.dotnet.framework.aspnet)