There are many ways a team can go wrong.
Ultimately, this is the Close method for a data reader that closes the connection if nothing has happened before.
If there is an exception that occurs inside the ExecuteReader or any of its called methods before the actual DataReader is created, then no, the connection will not be closed.
In case of an exception, I do not trust him to close the connection.
source share