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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top