>Using loSQLConnection As New SqlConnection(oApp.aConnection(nConnectionString, 1)) > oCommand.Connection = loSQLConnection > oDataAdapter.Fill(oDataSet) >End UsingIt goes like this:
Public oDataSet As DataSet = Nothing Private oSqlCommand As SqlCommand = Nothing Private oSqlDataAdapter As SqlDataAdapter = Nothing oSqlCommand.CommandText = lcSQL oSqlDataAdapter.SelectCommand = oSqlCommand oDataSet = New DataSet Using loSQLConnection As New SqlConnection(oApp.aConnection(nConnectionString, 1)) oSqlCommand.Connection = loSQLConnection oSqlDataAdapter.Fill(oDataSet) End Using