asp.net高级教程(二)- 转换编程思维(4) SQLDataReader myReader ; myCommand.Execute(out myReader) ; if (myReader.Read()) { m_intForumCount = (int)myReader["ForumCount"] ; m_intTopicCount = (int)myReader["TopicCount"] ; m_intUserCount = (int)myReader["UserCount"] ; } else { throw(new Exception("表或存储过程不存在")) ; } //清场 myReader.Close(); myConn.Close() ; }