What does Dispose method do with the connection object?

Deletes it from the memory.

Showing Answers 1 - 1 of 1 Answers

rjempo

  • Sep 9th, 2007
 

It is important to note that connection.Dispose() actually closes the connection first.

Hence I believe it is the preferred method of destroying a connection.  Given that one should really Dispose anything that implements Dispose.  eg otherwise you should call conn.Close() and then conn.Dispose()

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions