What is the diference?

  • Thread starter Thread starter Bruno Piovan
  • Start date Start date
B

Bruno Piovan

Hi,
what is the diference between

daAdapter.Dispose
and
daAdapter = Nothing

???????????

daAdapter is a DataAdapter

thanks,
Bruno
 
In one you are explicitly calling the Dispose method that frees up all the
unmanaged resources.

In the other, you are setting your variable to Nothing, but unmanaged
resources are not freed.

However, you do not need to do either. Just make sure you close all your
connection you are using for queries.
 
Back
Top