title: c# Dataset - modify SELECT statement with WHERE conditions
body: <p>I have a dataset, tableadapter, and bindingsource for getting data out of a database and into a windows form.</p>
  
  <p>The <code>SELECT</code> statement is basically a <code>SELECT * FROM Employee</code>s
  which returns 50,000 rows.</p>
  
  <p>I want to add a <code>WHERE</code> clause before I fill it, so I am not populating the datatable with 50,000 rows.  For example, modify the <code>SELECT</code> statement to:</p>
  
  <pre><code>SELECT * FROM Employees WHERE Lastname LIKE 'A%'
  </code></pre>
  
  <p>How can I do this?</p>
  
  <p>For example I am trying this but the SelectCommand is set to nothing, so it fails.  Not sure when the SelectCommand gets populated.</p>
  
  <pre><code>Me.taBoxesCarrierTech.Adapter.SelectCommand.CommandText = 
  Me.taBoxesCarrierTech.Adapter.SelectCommand.CommandText &amp; _
  "AND BL.LOG_NO = " &amp; mPhantomLogNum
  </code></pre>