Hi All!!<BR>I am using ADO .Net in a windows application in Vb.net. I have a function <BR>that accepts a query and return the results in a DataTable. It works fine <BR>for most of the time but some times it starts giving an error <BR>i.e "System.InvalidoperationException: Invalid attempt to read when the <BR>reader is closed"<BR><BR>I am not using the reader explicitely. I am using data Adapter and the <BR>error occures in "DA.Fill(DataTable)" call. <BR><BR>I have searched for this error statement on the web and in MSDN but in <BR>vain. I hope someone can give me an idea of what should i try.<BR><BR>my code looks like this .....<BR><BR> Me.objCmd = New System.Data.SqlClient.SqlCommand(strSql)<BR> Me.objCmd.Connection = objConnection<BR> Me.objDa = New System.Data.SqlClient.SqlDataAdapter(objCmd)<BR> Me.objDt = New System.Data.DataTable()<BR> Me.objDa.Fill(objDt)<BR> Return objDt<BR><BR>Well there is another observation that this error occures when this <BR>function is called in a loop for getting many results from different <BR>queries.<BR><BR>Hope to hear from you soon<BR>Regards<BR>Mustafa