DataReader and DataAdapter relation

  • Thread starter Thread starter Viswanathan S
  • Start date Start date
V

Viswanathan S

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
 
Hi,

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top