J
John Bailo
using (
SqlCommand cmd = new SqlCommand("select * sample"),
new SqlConnection( sqlDsn )
)
)
{
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
adapter.Fill(dt);
}
Does the SqlConnection automatically get closed when I exit the using?
SqlCommand cmd = new SqlCommand("select * sample"),
new SqlConnection( sqlDsn )
)
)
{
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
adapter.Fill(dt);
}
Does the SqlConnection automatically get closed when I exit the using?