What is the diference?

B

Bruno Piovan

Hi,
what is the diference between

daAdapter.Dispose
and
daAdapter = Nothing

???????????

daAdapter is a DataAdapter

thanks,
Bruno
 
M

Marina

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,052
Latest member
LucyCarper

Latest Threads

Top