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.
 
Back
Top