> Hello, in the below, would the connection on dbCommand be
> automatically closed once the code has left the using statement or is
[quoted text clipped - 9 lines]
>
> Jon
>From the MSDN documentation, it looks like it will be automatically
disposed at the end of the using block. The principle seems to be
this: If the object is an instance of a class that implement the
IDisposable interface, and if it is declared in a using statement,
then it will be automatically disposed when it exits the using block.
In your case, DbCommand does implement the IDisposable interface,
among others, so the answer is yes.
> Hello, in the below, would the connection on dbCommand be
> automatically closed once the code has left the using statement
Yes.

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net