title: Handling Optional .NET DataSource Parameters
body: <p>What is the standard way to implement optional query parameters in a .NET WinForms application?</p>
  
  <p>In other words, only query on a field if the value of a corresponding control is not null.</p>
  
  <p>Note: Prefer VB.NET answers (C# okay too)</p>
  
  <p><strong>EDIT:</strong> I use a FillBy method which calls a query in my Access database.  In the TableAdapter query editor, I just used <code>WHERE (field1 = ?) AND (field2 = ?) ...</code>  I just can't find the "hook" to bind form controls to the  table adapter query parameters and so that if a form uses the default value to not query on it.</p>