In my application (developed in VB.net) I have to execute several SQL statements. Therefore in the beginning I open a connection and in the end (when finishing my application) I close it.

Now, in some cases, I get the error message "There is already an open DataReader associated with this connection which must be closed first."

My question is: how can I determine if there is an open DataReader? I don't want to open and close my connection each time I execute an SQL statement because I think that would be bad to my performance.

Thanks in advance.