>
>>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.
Ok, I misunderstood what Viv said. Thank you for your explanation.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham