Using loSQLConnection As New SqlConnection(oApp.aConnection(nConnectionString, 1)) loSQLConnection.Open() oCommand.Connection = loSQLConnection oDataReader = oCommand.ExecuteReader(CommandBehavior.SchemaOnly) oDataTable = oDataReader.GetSchemaTable End UsingThe loSQLConnection.Open() was not necessary. Once removed, no connectivity remained.
Using loSQLConnection As New SqlConnection(oApp.aConnection(nConnectionString, 1)) loSQLConnection.Open() oCommand.Connection = loSQLConnection oDataReader = oCommand.ExecuteReader(CommandBehavior.SchemaOnly) oDataTable = oDataReader.GetSchemaTable End UsingBut, later on, still in the DataAdapter.Fill() command, this applies a permanent connection to something.
Using loSQLConnection As New SqlConnection(oApp.aConnection(nConnectionString, 1)) oCommand.Connection = loSQLConnection oDataAdapter.Fill(oDataSet) End UsingWhen that command executes, something remains stuck in memory. I have tried, oCommand.Connection.Close(), oCommand.Dispose(), oDataAdapter = Nothing and all of that at the same time.