title: How to use stored procedure for the CommandText of UpdateCommand?
body: <p>I have a DataGridView for editing a table. The following code is using to update the table.</p>
  
  <pre><code>using (SqlConnection con = new SqlConnection("...."))
  {
      con.Open();
  
      SqlDataAdapter da = new SqlDataAdapter("select * from T", con);
      SqlCommandBuilder cb = new SqlCommandBuilder(da);
      cb.ConflictOption = ConflictOption.OverwriteChanges;
  
      da.UpdateCommand = cb.GetUpdateCommand();
      // da.UpdateCommand.CommandText = "exec sp1 @p1, @p2, @p3...";
      da.InsertCommand = cb.GetInsertCommand();
      da.DeleteCommand = cb.GetDeleteCommand();
      da.Update(datatable.GetChanges());
  }
  </code></pre>
  
  <p>I found that <code>da.Update(datatable.GetChanges())</code> smartly generates minimal set clause according to the modified columns.</p>
  
  <pre class="lang-sql prettyprint-override"><code>update T set c1 = @p1 where K = @p2 -- If only c1 is changed in the grid 
  update T set c1 = @p1, c2 = @p2 where K = @p3 -- if both c1 and c2 is changed
  update T set c4 = @p1 where K = @p2 -- if only c4 is changed
  ......
  </code></pre>
  
  <p>How to write the stored procedure for the <code>CommandText</code>?</p>