title: CommandText property not initialised
body: <p>I seem to be getting this problem only after I've changed my working code to use a dataview as opposed to textboxes to display a single row of data.</p>
  
  <p>I have the following:</p>
  
  <pre><code>static SqlConnection dbConnection = new SqlConnection
                         (DBConnection.DBConnection.connectionString);        
      SqlDataAdapter holdone = new SqlDataAdapter(getCommand, dbConnection);      
  
      DataSet holdall = new DataSet();
      DataSet updateall = new DataSet();
      DataTable invoiceTable = new DataTable();
  
      DataView invoiceView = new DataView();
  </code></pre>
  
  <p>which is used by</p>
  
  <pre><code>public void GetOne(/* connectionString, string invref, string tableref*/)
      {
  
  getCommand = "select *redacted* from " + tableref +  
                                        "where *redacted* = " + invref;
  
          using (SqlConnection dbConnection = new SqlConnection
                                 (DBConnection.DBConnection.connectionString))
          {
                  dbConnection.Open();
  
              holdone.Fill(holdall);
  
              invoiceTable = holdall.Tables[0];
  
              dbConnection.Close();
  
  
          }
  
          DataRowView rowView = invoiceView.AddNew();
  
              rowView["*redacted*"] = invoiceTable;
  
              rowView.EndEdit();
      }
  </code></pre>
  
  <p>The error reports <code>holdone.fill(holdall)</code> as the offending line, however I am unsure as to why, as I'm not using <code>SQLCommand</code> as a parameter, rather a parameter of <code>SQLDataAdapter</code>.</p>
  
  <p>I'm struggling to see where I've gone wrong?</p>