>>This is where the query happens:
>>
>>>> Using loSQLConnection As New SqlConnection(lcConnectionString)
>> oCommand.Connection = loSQLConnection
>> oDataAdapter.Fill(oDataSet)
>> End Using
>>
>
>Do you usually close the connection? And if yes, how? The last segment of your code shows that you call Fill() method to fill the dataset. But this, if I understand correctly, leaves the connection open. How do you deal with this?Dmitry, I thought Viv already mentioned that to you: If .Fill() is called and the Connection is already open, it is left open after the filling the DataTable. If the Connection is not open, ADO.NET will open it, fill the DataTable and then close the Connection.
So, in the above code snippet, since it's a new Connection, the Connection will be closed automatically.