我用的是现成的KSSQL的DLL文件中的DataAccess.SqlHelper命名空间的类进行数据库操作的;我觉得他里面的sqlCOnnection应该是在集成的代码中关闭了吧???
可是有是时候会出现连接池已满的情况,这是connection没有关闭还是其他的原因呢???
肯定有很多人用过这个控件吧??大家说说这个控件可靠吗????

解决方案 »

  1.   

    LZ可以用reflactor对该dll进行反编译,看看是否存在着没有关闭连接的情况
      

  2.   

    如果他源代码里面写了关闭时间的话,那应该就会关闭的.你说的控件没用过,具体也不知道`o(∩_∩)o...,帮不了你>!`连接池已满的问题估计是数据库的问题`.Access数据库太弱小了`!
      

  3.   

    放心吧,他那个dll既然都封装好了,关闭肯定写了,找找其他问题吧
      

  4.   

    我用的sqlhelper就出现datareader没有关闭的问题,我加入了关闭代码.
      

  5.   

    datareader
    肯定是要自己关闭的
    我说的是SqlConnection
      

  6.   

    public static int ExecuteNonQuery(SqlConnection connection, CommandType commandType, string commandText, params SqlParameter[] commandParameters)
    {
        if (connection == null)
        {
            throw new ArgumentNullException("connection");
        }
        SqlCommand command = new SqlCommand();
        bool mustCloseConnection = false;
        PrepareCommand(command, connection, null, commandType, commandText, commandParameters, out mustCloseConnection);
        int num = command.ExecuteNonQuery();
        command.Parameters.Clear();
        if (mustCloseConnection)
        {
            connection.Close();
        }
        return num;
    }
    bool mustCloseConnection = false;
    也就是说没有关闭???
      

  7.   

    一般都应该是关闭了的
    但如果有返回DataReader这种数据类型的方法时,估计你要自己在外面关闭数据库连接,因为返回DataReader前不能关闭数据库连接,但这个方法一般在执行的时候会加上 关闭DataReader则关闭数据库连接的设置,所以你要在外面关闭Reader