it looks ok >>这样DataReader关闭了吗?no>>Connection关闭了吗?no>>如果用了好多这个make sure you call DataReader.Close() after you are done with the DataReader, it will automatically close the database connection since you used CommandBehavior.CloseConnectionThe general guideline with database connection is, open them as late as possible, and close them as soon as possible
public void RunProc(string procName, out SqlDataReader dataReader)
{
SqlCommand cmd = CreateCommand(procName, null);
dataReader = cmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection);
}