H
Howard
using (SqlConnection connection = new SqlConnection(constr))
{
using (SqlCommand command = new SqlCommand(com, connection))
{
//read from db
}
}
Is this sufficient to close db connections or do I need to add
connection.close()..
I know the object will be disposed after this statement but will it close
open db connections?
What is the best practice for running a sql query in asp.net
Thanks,
Howard
{
using (SqlCommand command = new SqlCommand(com, connection))
{
//read from db
}
}
Is this sufficient to close db connections or do I need to add
connection.close()..
I know the object will be disposed after this statement but will it close
open db connections?
What is the best practice for running a sql query in asp.net
Thanks,
Howard