Listing 1: Example of How Not to Manage Connections in ADO.NET Sub GetData(ByVal strSQL As String) Dim cn As New SqlConnection(strCommonConnectString) Dim dr As SqlDataReader Dim cmd As New SqlCommand(strSQL) cn.Open() ' Open a connection or draw a connection from the pool. dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) Do While dr.Read ProcessRow(dr) Loop End Sub ' DataReader and Connection are left open, which orphans the Connection.