顺便问下我用SqlDataReader reader = _command.ExecuteReader();觉得很不方便能有什么办法吧DataTable 弄过来用,这样也可以知道一共返回了多少行的记录

解决方案 »

  1.   

    还有一个问题 当我这样做的时候_command.Connection.Close();就BREAK了信息如下:
    An unhandled exception of type 'System.InvalidOperationException' occurred in system.data.dllAdditional information: A connection pooling error has occurred.
      

  2.   

    1、string state = _command.Connection.State.ToString();
    2、int num = _command.ExecuteNonQuery();
    3、
    if ( m_Connection != null )
    {
    m_Connection.Close();
    }
      

  3.   

    先谢谢了,但是 2我想知道的是能有什么办法吧DataTable 弄过来用3出现的错误是 A connection pooling error has occurred.不是null reference