Closing IDataReader

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
In few places within my code
the business object pass IDataReader to the GUI.
Suddenly i noticed that nowhere in the code the IDataReader
is being closed.
Does the data binding operation closes the IDataReader?
If i didn't close it explicitly, the IDataReader remains open untill GC will
clean it?


Thanks.
 
Hi

essentially iterating the datareader will close it however, it's a good
practise to close it explicitly (for example if an error can occur)
 
Back
Top