title: Modify TableAdapter Commands at Runtime
body: <p>Is it possible to modify the SELECT, UPDATE, DELETE, and INSERT commands for a tableadapter at runtime?  What I want to do is set the commands for the tableadapter based on the connection type (SQL Server or Access) the user selects  when the application opens.  </p>
  
  <p>Basically, I want the tableadapter names to remain the same so I don't have to put if statements in everywhere I call tableadapter.fill or .update methods.  Instead, I want to put an if statement in after the connection string is chosen and modify the SELECT, UPDATE, DELETE, and INSERT commands based on what the user selects.  Something like below</p>
  
  <pre><code>If ConnectionString  = Access Then
      tableadapter.selectcommand="SELECT...FROM AccessDbase"
  Else
      tableadapter.selectcommand="SELECT...FROM SQLDbase"
  End if 
  </code></pre>
  
  <p>What is the best way to do this without having to create two separate applications (one to connect to Access and on for SQL Server)?</p>
  
  <p>Many thanks in advance.</p>